Skip to content

[BUG] Codes used to describe segments in DICOM SEG writer should be improved #279

@fedorov

Description

@fedorov

Describe the bug
Codes used to describe segments in DICOM SEG writer should be improved.

Steps/Code to reproduce bug
See

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

  1. SegmentationCategoryType should 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 the SegmentLabel. This is not the intended use of this object.
  2. Codes should be using SNOMED-CT SCT codes, currently used SRT codes have been deprecated in DICOM.

Environment details (please complete the following information)

  • SDK Version: current as of submitting

Additional context

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions