DicomRTTool


NameDicomRTTool JSON
Version 2.0.7 PyPI version JSON
download
home_pagehttps://github.com/brianmanderson/Dicom_RT_and_Images_to_Mask
SummaryServices for reading dicom files, RT structures, and dose files, as well as tools for converting numpy prediction masks back to an RT structure
upload_time2023-03-26 20:10:14
maintainer
docs_urlNone
authorBrian Mark Anderson
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

![multiple_rings.png](./Images/multiple_rings.png)


#### 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": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Brian Mark Anderson",
    "author_email": "b5anderson@health.ucsd.edu",
    "download_url": "https://files.pythonhosted.org/packages/08/01/0a1bb863052fb3ad97f4f21e70303db939f891ef5803cc52adc58038f6c9/DicomRTTool-2.0.7.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\r\n### DOI:https://doi.org/10.1016/j.prro.2021.02.003\r\n\r\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\r\n## Installation guide\r\n    pip install DicomRTTool\r\n### Highly recommend to go through the jupyter notebook in the Examples folder and to read the Wiki\r\n\r\n### Quick use guide\r\n    from DicomRTTool.ReaderWriter import DicomReaderWriter, ROIAssociationClass\r\n    Dicom_path = r'.some_path_to_dicom'\r\n    Dicom_reader = DicomReaderWriter(description='Examples', arg_max=True)\r\n    Dicom_reader.walk_through_folders(Dicom_path) # This will parse through all DICOM present in the folder and subfolders\r\n    all_rois = Dicom_reader.return_rois(print_rois=True) # Return a list of all rois present\r\n    \r\n    Contour_names = ['tumor'] # Define what rois you want\r\n    associations = [ROIAssociationClass('tumor', ['tumor_mr', 'tumor_ct'])] # Any list of roi associations\r\n    Dicom_reader.set_contour_names_and_assocations(contour_names=Contour_names, associations=associations)\r\n    \r\n    Dicom_reader.get_images_and_mask()\r\n    \r\n    image_numpy = Dicom_reader.ArrayDicom\r\n    mask_numpy = Dicom_reader.mask\r\n    image_sitk_handle = Dicom_reader.dicom_handle\r\n    mask_sitk_handle = Dicom_reader.annotation_handle\r\n\r\n### Other interesting additions\r\n### Adding information to the Dicom_reader.series_instances_dictionary\r\n    from DicomRTTool.ReaderWriter import Tag\r\n    plan_pydicom_string_keys = {\"MyNamedRTPlan\": Tag((0x300a, 0x002))}\r\n    image_sitk_string_keys = {\"MyPatientName\": \"0010|0010\"}\r\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)\r\n    \r\n\r\n##### If you find this code useful, please provide a reference to my github page for others www.github.com/brianmanderson , thank you!\r\n\r\n###### Ring update allows for multiple rings to be represented correctly\r\n\r\n![multiple_rings.png](./Images/multiple_rings.png)\r\n\r\n\r\n#### Works on oblique images for masks and predictions*\r\n",
    "bugtrack_url": null,
    "license": "",
    "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.0.7",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "676cd8aa5b35fadc74106750efb510d3ca75553eb31c1fc17619beac46d68863",
                "md5": "5e98c34c72b8d8136102d60423441e2e",
                "sha256": "3a859001feef62667a98fefb16431bc68f2f1ac87123eee38497b90acfbff367"
            },
            "downloads": -1,
            "filename": "DicomRTTool-2.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5e98c34c72b8d8136102d60423441e2e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 37654,
            "upload_time": "2023-03-26T20:10:10",
            "upload_time_iso_8601": "2023-03-26T20:10:10.882773Z",
            "url": "https://files.pythonhosted.org/packages/67/6c/d8aa5b35fadc74106750efb510d3ca75553eb31c1fc17619beac46d68863/DicomRTTool-2.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "08010a1bb863052fb3ad97f4f21e70303db939f891ef5803cc52adc58038f6c9",
                "md5": "091c81856f5156d4b783b7ec6dff22c6",
                "sha256": "5a968f68691b44ad5cd2885c97b196d154a63b55d708891ade060b8f736439f4"
            },
            "downloads": -1,
            "filename": "DicomRTTool-2.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "091c81856f5156d4b783b7ec6dff22c6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 626890,
            "upload_time": "2023-03-26T20:10:14",
            "upload_time_iso_8601": "2023-03-26T20:10:14.427290Z",
            "url": "https://files.pythonhosted.org/packages/08/01/0a1bb863052fb3ad97f4f21e70303db939f891ef5803cc52adc58038f6c9/DicomRTTool-2.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-26 20:10:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "brianmanderson",
    "github_project": "Dicom_RT_and_Images_to_Mask",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "dicomrttool"
}
        
Elapsed time: 0.06821s