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

binary-masks deep-learning deeplearning dicom dicom-images dicomrt mask medical-image-processing medical-imaging nifti-images numpy python roi roi-segmentation rt-struct rt-structs rt-utils rtstruct
Last synced: 5 months ago · JSON representation

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
  • Host: GitHub
  • Owner: brianmanderson
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 73.9 MB
Statistics
  • Stars: 101
  • Watchers: 2
  • Forks: 30
  • Open Issues: 0
  • Releases: 8
Topics
binary-masks deep-learning deeplearning dicom dicom-images dicomrt mask medical-image-processing medical-imaging nifti-images numpy python roi roi-segmentation rt-struct rt-structs rt-utils rtstruct
Created almost 7 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

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

multiple_rings.png

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

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

All Time
  • Total Commits: 608
  • Total Committers: 9
  • Avg Commits per committer: 67.556
  • Development Distribution Score (DDS): 0.033
Past Year
  • Commits: 11
  • Committers: 1
  • Avg Commits per committer: 11.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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

  • Versions: 81
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 242 Last month
Rankings
Forks count: 7.8%
Stargazers count: 8.3%
Downloads: 9.8%
Dependent packages count: 10.0%
Average: 11.5%
Dependent repos count: 21.7%
Maintainers (1)
Last synced: 6 months ago
pypi.org: plotscrollnumpyarrays

Services for plotting and viewing

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 174 Last month
Rankings
Dependent packages count: 10.0%
Downloads: 17.5%
Average: 20.8%
Dependent repos count: 21.7%
Forks count: 22.6%
Stargazers count: 31.9%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • Pillow *
  • SimpleITK *
  • check-manifest *
  • matplotlib *
  • numpy *
  • opencv-python >=4.2.0.32
  • openpyxl *
  • pandas *
  • pydicom *
  • scikit-image *
  • scipy *
  • six *
  • tqdm *
  • xlrd *
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v2 composite
  • github/codeql-action/analyze v1 composite
  • github/codeql-action/autobuild v1 composite
  • github/codeql-action/init v1 composite
.github/workflows/new_test.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/python-publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
setup.py pypi