Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
fedorov opened this issue Mar 23, 2022 · 6 comments · Fixed by #327
Closed

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

fedorov opened this issue Mar 23, 2022 · 6 comments · Fixed by #327
Assignees
Labels
bug Something isn't working
Projects

Comments

@fedorov
Copy link

fedorov commented Mar 23, 2022

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

@fedorov fedorov added the bug Something isn't working label Mar 23, 2022
@fedorov
Copy link
Author

fedorov commented Mar 24, 2022

I am sure @dclunie will at least be interested to be aware of this discussion.

@dclunie
Copy link

dclunie commented Mar 24, 2022

I assume you mean SegmentedPropertyTypeCodeSequence, not SegmentationCategoryType.

See also https://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_7151.html

@dbericat
Copy link
Member

Thanks for the feedback! @MMelQin, @vikashg and/or @gigony will address the first part.

Regarding highdicom, we all want to do that. It's just that @CPBridge has been busy lately, right Chris? ;)

Check this out: #195

It is currently planned for 0.4.0. https://github.com/Project-MONAI/monai-deploy-app-sdk/projects/6

@hackermd
Copy link

@dbericat thanks for your feedback and sorry for the delay on our end. @CPBridge and I will finalize the PR as soon as possible.

@fedorov
Copy link
Author

fedorov commented Mar 25, 2022

If the plan is to switch to highdicom, this issue will not be applicable - feel free to close.

@MMelQin
Copy link
Collaborator

MMelQin commented Mar 30, 2022

Thanks for feedbacks. Agree the existing DICOM Seg Writer code needs to be enhanced, for its intended purpose, and also there is a defect I filed and need to fix.

@MMelQin MMelQin added this to To do in v0.5.0 via automation Aug 17, 2022
@MMelQin MMelQin linked a pull request Aug 17, 2022 that will close this issue
@MMelQin MMelQin moved this from To do to Done in v0.5.0 Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

6 participants