# 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 Dicom_reader.series_instances_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*
Raw data
{
"_id": null,
"home_page": "https://github.com/brianmanderson/Dicom_RT_and_Images_to_Mask",
"name": "DicomRTTool",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Brian Mark Anderson",
"author_email": "b5anderson@health.ucsd.edu",
"download_url": "https://files.pythonhosted.org/packages/73/46/1a2c5547ea1af2ac3beaeee6571de6b07005cefceaaf8fd7632eba39524e/dicomrttool-2.2.0.tar.gz",
"platform": null,
"description": "# 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\n### DOI:https://doi.org/10.1016/j.prro.2021.02.003\n\n## This code provides functionality for turning dicom images and RT structures into nifti files as well as turning prediction masks back into RT structures\n## Installation guide\n pip install DicomRTTool\n### Highly recommend to go through the jupyter notebook in the Examples folder and to read the Wiki\n\n### Quick use guide\n from DicomRTTool.ReaderWriter import DicomReaderWriter, ROIAssociationClass\n Dicom_path = r'.some_path_to_dicom'\n Dicom_reader = DicomReaderWriter(description='Examples', arg_max=True)\n Dicom_reader.walk_through_folders(Dicom_path) # This will parse through all DICOM present in the folder and subfolders\n all_rois = Dicom_reader.return_rois(print_rois=True) # Return a list of all rois present\n \n Contour_names = ['tumor'] # Define what rois you want\n associations = [ROIAssociationClass('tumor', ['tumor_mr', 'tumor_ct'])] # Any list of roi associations\n Dicom_reader.set_contour_names_and_assocations(contour_names=Contour_names, associations=associations)\n \n Dicom_reader.get_images_and_mask()\n \n image_numpy = Dicom_reader.ArrayDicom\n mask_numpy = Dicom_reader.mask\n image_sitk_handle = Dicom_reader.dicom_handle\n mask_sitk_handle = Dicom_reader.annotation_handle\n\n### Other interesting additions\n### Adding information to the Dicom_reader.series_instances_dictionary\n from DicomRTTool.ReaderWriter import Tag\n plan_pydicom_string_keys = {\"MyNamedRTPlan\": Tag((0x300a, 0x002))}\n image_sitk_string_keys = {\"MyPatientName\": \"0010|0010\"}\n Dicom_reader = DicomReaderWriter(description='Examples', arg_max=True, plan_pydicom_string_keys=plan_pydicom_string_keys, image_sitk_string_keys=image_sitk_string_keys)\n \n\n##### If you find this code useful, please provide a reference to my github page for others www.github.com/brianmanderson , thank you!\n\n###### Ring update allows for multiple rings to be represented correctly\n\n\n\n\n#### Works on oblique images for masks and predictions*\n",
"bugtrack_url": null,
"license": null,
"summary": "Services for reading dicom files, RT structures, and dose files, as well as tools for converting numpy prediction masks back to an RT structure",
"version": "2.2.0",
"project_urls": {
"Homepage": "https://github.com/brianmanderson/Dicom_RT_and_Images_to_Mask"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "78185ccd694c54262c0a2e91f976f1a0fdab3ff1572dea0d6e731db49f5d58b2",
"md5": "40096ddb55ee0f4a1c5f2f7fb7c161da",
"sha256": "8de59a76a3ae915fab058bd84d07f063184fc6d565044c8593ed61720dd981a5"
},
"downloads": -1,
"filename": "DicomRTTool-2.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "40096ddb55ee0f4a1c5f2f7fb7c161da",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 39150,
"upload_time": "2024-12-03T17:09:27",
"upload_time_iso_8601": "2024-12-03T17:09:27.850805Z",
"url": "https://files.pythonhosted.org/packages/78/18/5ccd694c54262c0a2e91f976f1a0fdab3ff1572dea0d6e731db49f5d58b2/DicomRTTool-2.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "73461a2c5547ea1af2ac3beaeee6571de6b07005cefceaaf8fd7632eba39524e",
"md5": "f10195d2f92faee54b21bbaf89f99eb1",
"sha256": "8014a864d992b4a125787b3a94c61a78ee254bf3b3358de3c205d8436e1ed236"
},
"downloads": -1,
"filename": "dicomrttool-2.2.0.tar.gz",
"has_sig": false,
"md5_digest": "f10195d2f92faee54b21bbaf89f99eb1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 628875,
"upload_time": "2024-12-03T17:09:29",
"upload_time_iso_8601": "2024-12-03T17:09:29.379396Z",
"url": "https://files.pythonhosted.org/packages/73/46/1a2c5547ea1af2ac3beaeee6571de6b07005cefceaaf8fd7632eba39524e/dicomrttool-2.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-03 17:09:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "brianmanderson",
"github_project": "Dicom_RT_and_Images_to_Mask",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "numpy",
"specs": []
},
{
"name": "matplotlib",
"specs": []
},
{
"name": "opencv-python",
"specs": []
},
{
"name": "openpyxl",
"specs": []
},
{
"name": "pandas",
"specs": []
},
{
"name": "Pillow",
"specs": []
},
{
"name": "pydicom",
"specs": []
},
{
"name": "scikit-image",
"specs": []
},
{
"name": "scipy",
"specs": []
},
{
"name": "SimpleITK",
"specs": []
},
{
"name": "six",
"specs": []
},
{
"name": "xlrd",
"specs": []
},
{
"name": "check-manifest",
"specs": []
},
{
"name": "tqdm",
"specs": []
},
{
"name": "pytest",
"specs": []
},
{
"name": "NiftiResampler",
"specs": []
},
{
"name": "PlotScrollNumpyArrays",
"specs": []
}
],
"lcname": "dicomrttool"
}