https://github.com/brianmanderson/dicom_rt_and_images_to_mask
Tools to help with the conversion of DICOM images, RT Structures, and dose to useful Python objects. Essentially DICOM to NumPy and SimpleITK Images
https://github.com/brianmanderson/dicom_rt_and_images_to_mask
Science Score: 46.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: sciencedirect.com -
✓Committers with academic emails
3 of 9 committers (33.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.0%) to scientific vocabulary
Keywords
Repository
Tools to help with the conversion of DICOM images, RT Structures, and dose to useful Python objects. Essentially DICOM to NumPy and SimpleITK Images
Basic Info
Statistics
- Stars: 101
- Watchers: 2
- Forks: 30
- Open Issues: 0
- Releases: 8
Topics
Metadata Files
README.md
We're published! Please check out the Technical Note here: https://www.sciencedirect.com/science/article/abs/pii/S1879850021000485 and reference this work if you find it useful
DOI:https://doi.org/10.1016/j.prro.2021.02.003
This code provides functionality for turning dicom images and RT structures into nifti files as well as turning prediction masks back into RT structures
Installation guide
pip install DicomRTTool
Highly recommend to go through the jupyter notebook in the Examples folder and to read the Wiki
Quick use guide
from DicomRTTool.ReaderWriter import DicomReaderWriter, ROIAssociationClass
Dicom_path = r'.some_path_to_dicom'
Dicom_reader = DicomReaderWriter(description='Examples', arg_max=True)
Dicom_reader.walk_through_folders(Dicom_path) # This will parse through all DICOM present in the folder and subfolders
all_rois = Dicom_reader.return_rois(print_rois=True) # Return a list of all rois present
Contour_names = ['tumor'] # Define what rois you want
associations = [ROIAssociationClass('tumor', ['tumor_mr', 'tumor_ct'])] # Any list of roi associations
Dicom_reader.set_contour_names_and_assocations(contour_names=Contour_names, associations=associations)
Dicom_reader.get_images_and_mask()
image_numpy = Dicom_reader.ArrayDicom
mask_numpy = Dicom_reader.mask
image_sitk_handle = Dicom_reader.dicom_handle
mask_sitk_handle = Dicom_reader.annotation_handle
Other interesting additions
Adding information to the Dicomreader.seriesinstances_dictionary
from DicomRTTool.ReaderWriter import Tag
plan_pydicom_string_keys = {"MyNamedRTPlan": Tag((0x300a, 0x002))}
image_sitk_string_keys = {"MyPatientName": "0010|0010"}
Dicom_reader = DicomReaderWriter(description='Examples', arg_max=True, plan_pydicom_string_keys=plan_pydicom_string_keys, image_sitk_string_keys=image_sitk_string_keys)
If you find this code useful, please provide a reference to my github page for others www.github.com/brianmanderson , thank you!
Ring update allows for multiple rings to be represented correctly

Works on oblique images for masks and predictions*
Owner
- Name: Brian Mark Anderson, PhD
- Login: brianmanderson
- Kind: user
- Location: San Diego, California
- Company: UC San Diego Health
- Twitter: _BrianAnderson_
- Repositories: 19
- Profile: https://github.com/brianmanderson
Resident in Medical Physics at the UC San Diego Health
GitHub Events
Total
- Watch event: 16
- Push event: 2
- Fork event: 2
- Create event: 1
Last Year
- Watch event: 16
- Push event: 2
- Fork event: 2
- Create event: 1
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| markba122@gmail.com | b****n@m****g | 588 |
| Kareem | k****1@g****m | 10 |
| breber | b****r@a****a | 2 |
| Wahid | K****d@m****g | 2 |
| Anderson | b****n@U****U | 2 |
| lcmoore | l****e@p****m | 1 |
| Rigaud | B****d@m****g | 1 |
| Evan Porter | e****t@g****m | 1 |
| Dominic DiCostanzo | d****2@o****u | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 23
- Total pull requests: 16
- Average time to close issues: about 1 month
- Average time to close pull requests: about 15 hours
- Total issue authors: 20
- Total pull request authors: 6
- Average comments per issue: 3.22
- Average comments per pull request: 0.06
- Merged pull requests: 15
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- brianmanderson (2)
- karim1871 (2)
- 1413194910 (2)
- eduran90 (1)
- ddicostanzo (1)
- kwahid (1)
- evan-porter (1)
- ptahery (1)
- juandoso (1)
- fedmastroleo (1)
- naveensweth (1)
- Abderaoufbhc (1)
- GuobinZhangTJU (1)
- LingyueSun (1)
- shawoo030 (1)
Pull Request Authors
- brianmanderson (11)
- maxxyouu (2)
- lcmoore (1)
- evan-porter (1)
- guatavita (1)
- ddicostanzo (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 416 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 2
(may contain duplicates) - Total versions: 88
- Total maintainers: 1
pypi.org: dicomrttool
Services for reading dicom files, RT structures, and dose files, as well as tools for converting numpy prediction masks back to an RT structure
- Homepage: https://github.com/brianmanderson/Dicom_RT_and_Images_to_Mask
- Documentation: https://dicomrttool.readthedocs.io/
- License: GNU Affero General Public License v3
-
Latest release: 2.2.0
published about 1 year ago
Rankings
Maintainers (1)
pypi.org: plotscrollnumpyarrays
Services for plotting and viewing
- Homepage: https://github.com/brianmanderson/Dicom_RT_and_Images_to_Mask
- Documentation: https://plotscrollnumpyarrays.readthedocs.io/
- License: GNU Affero General Public License v3
-
Latest release: 2.0.11
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- Pillow *
- SimpleITK *
- check-manifest *
- matplotlib *
- numpy *
- opencv-python >=4.2.0.32
- openpyxl *
- pandas *
- pydicom *
- scikit-image *
- scipy *
- six *
- tqdm *
- xlrd *
- actions/checkout v2 composite
- github/codeql-action/analyze v1 composite
- github/codeql-action/autobuild v1 composite
- github/codeql-action/init v1 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite