-
Notifications
You must be signed in to change notification settings - Fork 61
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Codes used to describe segments in DICOM SEG writer should be improved.
Steps/Code to reproduce bug
See
monai-deploy-app-sdk/monai/deploy/operators/dicom_seg_writer_operator.py
Lines 440 to 463 in 294fb6e
| def create_label_segment(label, name): | |
| """Creates segment labels""" | |
| segment = Dataset() | |
| segment.add_new(0x00620004, "US", int(label)) # SegmentNumber | |
| segment.add_new(0x00620005, "LO", name) # SegmentLabel | |
| segment.add_new(0x00620009, "LO", "AI Organ Segmentation") # SegmentAlgorithmName | |
| segment.SegmentAlgorithmType = "AUTOMATIC" # SegmentAlgorithmType | |
| segment.add_new(0x0062000D, "US", [128, 174, 128]) # RecommendedDisplayCIELabValue | |
| # Create SegmentedPropertyCategoryCodeSequence | |
| segmentedPropertyCategoryCodeSequence = Sequence() | |
| segmentedPropertyCategoryCodeSequenceDS = Dataset() | |
| segmentedPropertyCategoryCodeSequenceDS.add_new(0x00080100, "SH", "T-D0050") # CodeValue | |
| segmentedPropertyCategoryCodeSequenceDS.add_new(0x00080102, "SH", "SRT") # CodingSchemeDesignator | |
| segmentedPropertyCategoryCodeSequenceDS.add_new(0x00080104, "LO", "Anatomical Structure") # CodeMeaning | |
| segmentedPropertyCategoryCodeSequence.append(segmentedPropertyCategoryCodeSequenceDS) | |
| segment.SegmentedPropertyCategoryCodeSequence = segmentedPropertyCategoryCodeSequence | |
| # Create SegmentedPropertyTypeCodeSequence | |
| segmentedPropertyTypeCodeSequence = Sequence() | |
| segmentedPropertyTypeCodeSequenceDS = Dataset() | |
| segmentedPropertyTypeCodeSequenceDS.add_new(0x00080100, "SH", "T-D0050") # CodeValue | |
| segmentedPropertyTypeCodeSequenceDS.add_new(0x00080102, "SH", "SRT") # CodingSchemeDesignator | |
| segmentedPropertyTypeCodeSequenceDS.add_new(0x00080104, "LO", "Organ") # CodeMeaning | |
| segmentedPropertyTypeCodeSequence.append(segmentedPropertyTypeCodeSequenceDS) | |
| segment.SegmentedPropertyTypeCodeSequence = segmentedPropertyTypeCodeSequence |
Expected behavior
SegmentationCategoryTypeshould refer to the code corresponding to the specific organ. Currently, there is a general code for "Organ", with the specifics about which organ is segmented listed in theSegmentLabel. This is not the intended use of this object.- Codes should be using SNOMED-CT
SCTcodes, currently usedSRTcodes have been deprecated in DICOM.
Environment details (please complete the following information)
- SDK Version: current as of submitting
Additional context
- Relevant commit in dcmqi: QIICR/dcmqi@0cf2829
- why don't you just use highdicom to write DICOM SEG? https://github.com/herrmannlab/highdicom
pieper
Metadata
Metadata
Labels
bugSomething isn't workingSomething isn't working