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

Improve support of DICOM SR TID1500 containing groups of measurements derived from SEG #3390

Open
sedghi opened this issue May 12, 2023 · 13 comments
Assignees
Labels
IDC:candidate Possible feature requests for discussion, and if we agree, they can be relabeled IDC:priority

Comments

@sedghi
Copy link
Member

sedghi commented May 12, 2023

Describe the Bug

Seems like we don't have support for TID1500, Here is the sample data from the dcmqi

https://www.dropbox.com/s/k6bdq4tt6itbcfp/Archive.zip?dl=0

Steps to Reproduce:

  1. First step
  2. Second step
  3. ...
Please use code blocks to show formatted errors or code snippets

The current behavior

A clear and concise description of what happens instead of the expected
behavior.

The expected behavior

A clear and concise description of what you expected to happen.

⚠️ Reports we cannot reproduce are at risk of being marked stale and
closed. The more information you can provide, the more likely we are to look
into and address your issue.

@james-hanks
Copy link

james-hanks commented Oct 25, 2023

@sedghi to update estimate

@sedghi
Copy link
Member Author

sedghi commented Nov 22, 2023

@fedorov @igoroctaviano Can you guys provide some insight about what is specific about this DICOM SR that we are not able to render correctly by looking into its tags?

Based on my debugging, it seems that we don't even reach the processTID14010Measurement function because there is no valueType of SCOORD and SCOORD3D.

https://github.com/OHIF/Viewers/blob/master/extensions/cornerstone-dicom-sr/src/getSopClassHandlerModule.ts#L368-L374

In 3D Slicer it looks like it maps to a fiducial?

Image

@fedorov
Copy link
Member

fedorov commented Nov 22, 2023

SR TID1500 does not have to contain SCOORD or SCOORD3D. This specific SR contains a list of measurements corresponding to a region defined by a segment in the referenced DICOM SEG. Below is a portion of output of the DCMTK dsrdump command line tool. It does not look like Slicer handles this SR correctly. SR is not commonly used in Slicer, so I am not surprised.

Enhanced SR Document

Series              : QIN CT challenge: alg02 run2segmentation result - pyradiomics features (#1)
Manufacturer        : QIICR (https://github.com/QIICR/dcmqi.git, #0)
Completion Flag     : PARTIAL
Verification Flag   : UNVERIFIED
Content Date/Time   : 2018-11-05 16:45:23

<CONTAINER:(,,"Imaging Measurement Report")=SEPARATE>
  <has concept mod CODE:(,,"Language of Content Item and Descendants")=(eng,RFC5646,"English")>
  <has obs context CODE:(,,"Observer Type")=(121007,DCM,"Device")>
  <has obs context UIDREF:(,,"Device Observer UID")="1.3.6.1.4.1.43046.3.1.4.0.13541.1541454322.848790">
  <has obs context TEXT:(,,"Device Observer Name")="pyradiomics">
  <has obs context TEXT:(,,"Device Observer Model Name")="2.1.0.post36+g41000f5">
  <has concept mod CODE:(,,"Procedure reported")=(P0-0099A,SRT,"Imaging procedure")>
  <contains CONTAINER:(,,"Image Library")=SEPARATE>
    <contains CONTAINER:(,,"Image Library Group")=SEPARATE>
      <has acq context CODE:(,,"Modality")=(CT,DCM,"Computed Tomography")>
      <has acq context CODE:(,,"Target Region")=(T-D3000,SRT,"Chest")>
      <has acq context DATE:(,,"Study Date")="20000101">
      <has acq context DATE:(,,"Content Date")="20000101">
      <has acq context DATE:(,,"Acquisition Date")="20000101">
      <has acq context UIDREF:(,,"Frame of Reference UID")="1.3.6.1.4.1.14519.5.2.1.6279.6001.661736173813057305918521148633">
      <has acq context NUM:(,,"Pixel Data Rows")="512" ({pixels},UCUM,"pixels")>
      <has acq context NUM:(,,"Pixel Data Columns")="512" ({pixels},UCUM,"pixels")>
      <has acq context NUM:(,,"Horizontal Pixel Spacing")="0.78125" (mm,UCUM,"millimeter")>
      <has acq context NUM:(,,"Vertical Pixel Spacing")="0.78125" (mm,UCUM,"millimeter")>
      <has acq context NUM:(,,"Slice Thickness")="1.0" (mm,UCUM,"millimeter")>
      <has acq context NUM:(,,"Image Position (Patient) X")="-201" (mm,UCUM,"millimeter")>
      <has acq context NUM:(,,"Image Position (Patient) Y")="-59" (mm,UCUM,"millimeter")>
      <has acq context NUM:(,,"Image Orientation (Patient) Row X")="1" ({-1:1},UCUM,"{-1:1}")>
      <has acq context NUM:(,,"Image Orientation (Patient) Row Y")="0" ({-1:1},UCUM,"{-1:1}")>
      <has acq context NUM:(,,"Image Orientation (Patient) Row Z")="0" ({-1:1},UCUM,"{-1:1}")>
      <has acq context NUM:(,,"Image Orientation (Patient) Column X")="0" ({-1:1},UCUM,"{-1:1}")>
      <has acq context NUM:(,,"Image Orientation (Patient) Column Y")="1" ({-1:1},UCUM,"{-1:1}")>
      <has acq context NUM:(,,"Image Orientation (Patient) Column Z")="0" ({-1:1},UCUM,"{-1:1}")>
      <contains IMAGE:=(CT image,)>
        <has acq context NUM:(,,"Image Position (Patient) Z")="-456.800049" (mm,UCUM,"millimeter")>
      <contains IMAGE:=(CT image,)>
        <has acq context NUM:(,,"Image Position (Patient) Z")="-590.800049" (mm,UCUM,"millimeter")>
      <contains IMAGE:=(CT image,)>
        <has acq context NUM:(,,"Image Position (Patient) Z")="-644.800049" (mm,UCUM,"millimeter")>
      <contains IMAGE:=(CT image,)>
        <has acq context NUM:(,,"Image Position (Patient) Z")="-453.800049" (mm,UCUM,"millimeter")>

@fedorov
Copy link
Member

fedorov commented Nov 22, 2023

Sorry, the dump above is image library. The most relevant part is the measurement group:

<contains CONTAINER:(,,"Imaging Measurements")=SEPARATE>
    <contains CONTAINER:(,,"Measurement Group")=SEPARATE>
      <has obs context TEXT:(,,"Tracking Identifier")="Mass">
      <has obs context UIDREF:(,,"Tracking Unique Identifier")="1.3.6.1.4.1.43046.3.1.4.0.13541.1541454323.848791">
      <contains CODE:(,,"Finding")=(M-03000,SRT,"Mass")>
      <contains IMAGE:(,,"Referenced Segment")=(SG image,,1)>
      <contains UIDREF:(,,"Source series for segmentation")="1.3.6.1.4.1.14519.5.2.1.6279.6001.154677396354641150280013275227">
      <contains NUM:(,,"Surface to volume ratio")="4.961525E-01" (1,UCUM,"no units")>
      <contains NUM:(,,"Flatness")="6.349019E-01" (1,UCUM,"no units")>
      <contains NUM:(,,"Maximum 3D diameter")="2.190890E+01" (1,UCUM,"no units")>
      <contains NUM:(,,"Surface area")="9.509589E+02" (1,UCUM,"no units")>
      <contains NUM:(,,"Elongation")="8.757179E-01" (1,UCUM,"no units")>
      <contains NUM:(,,"shape_Maximum2DDiameterRow")="2.039608E+01" (1,UCUM,"no units")>
      <contains NUM:(,,"Approximate volume")="1.992000E+03" (1,UCUM,"no units")>
      <contains NUM:(,,"Least axis length")="1.116752E+01" (1,UCUM,"no units")>
      <contains NUM:(,,"Minor axis length")="1.540332E+01" (1,UCUM,"no units")>
      <contains NUM:(,,"Major axis length")="1.758936E+01" (1,UCUM,"no units")>
      <contains NUM:(,,"shape_Maximum2DDiameterColumn")="2.000000E+01" (1,UCUM,"no units")>
      <contains NUM:(,,"Volume")="1.916667E+03" (1,UCUM,"no units")>
      <contains NUM:(,,"Sphericity")="7.846695E-01" (1,UCUM,"no units")>
      <contains NUM:(,,"shape_Maximum2DDiameterSlice")="2.000000E+01" (1,UCUM,"no units")>

@fedorov
Copy link
Member

fedorov commented Nov 22, 2023

One challenge in using TID1500 is that it has different "branches" that cover different situations (volumetric vs planar annotations, quantitative vs qualitative measurements), and is quite complex - like most things in DICOM, unfortunately.

But, as @pieper likes to say, it's not like we are dealing with a simple problem. The world of image-based measurements is complex, and the template reflects this reality.

@sedghi
Copy link
Member Author

sedghi commented Nov 22, 2023

@fedorov Thanks a lot for fast investigation

This specific SR contains a list of measurements corresponding to a region defined by a segment in the referenced DICOM SEG

So I guess my data is missing that DICOM SEG. Do expect the viewer load the SEG and show the annotation on the SEG or you expect it to work on the referenced Image only?

How commonly are TID1500 used? I'm trying to understand the scope for this, as it seems like a complicated task.

@fedorov
Copy link
Member

fedorov commented Nov 22, 2023

I think it might be best to meet to discuss this, as I do not know the background for this issue. OHIF already supports some "variants" of TID 1500 - this is what is used to encode content discussed in #3358 and #2404.

The specific variant in this issue encodes radiomics features extracted from an image region defined by a segment, which is quite a common use case, in my view. But how commonly those are used, I do not know. We do have some of those samples in IDC. E.g., see SRs in this study for LIDC-IDRI: https://viewer.imaging.datacommons.cancer.gov/viewer/1.3.6.1.4.1.14519.5.2.1.6279.6001.224985459390356936417021464571. In this case, it is a much smaller list of measurements, with just volume and surface area of the segment.

@sedghi sedghi changed the title DICOM SR TID1500 wrong item issue DICOM SR TID1500 Dec 15, 2023
@fedorov fedorov changed the title DICOM SR TID1500 Improve support of DICOM SR TID1500 containing groups of measurements derived from SEG Dec 15, 2023
@james-hanks james-hanks added the Awaiting Data to Reproduce The maintainers have requested anonymized data to reproduce the issue. label Jan 3, 2024
@james-hanks james-hanks removed the Awaiting Reproduction Can we reproduce the reported bug? label Feb 21, 2024
@highoncarbs
Copy link

Any Updates on this? or possible solutions that can work out of the box ?

@sedghi
Copy link
Member Author

sedghi commented Jun 14, 2024

@highoncarbs
We offer extensive support for TID1500. You can refer to the sr extension for more information. Have you anonymized your data for sharing?

@highoncarbs
Copy link

highoncarbs commented Jun 17, 2024

@sedghi Hello, apologies for the delay.
Here's the dicomJSON - ( extracted using the script from OHIF docs )

jack-doe.json

Do you also want me to share the dicom files ?

image

@sedghi
Copy link
Member Author

sedghi commented Jun 18, 2024

Yes, ideally the anonymized dicom files for us to see if it is dicom json issue or sr issue

@highoncarbs
Copy link

@sedghi sure
Jack_Doe_DICOM.zip

@sedghi sedghi removed the Awaiting Data to Reproduce The maintainers have requested anonymized data to reproduce the issue. label Jun 21, 2024
@wayfarer3130
Copy link
Contributor

The above screen shot is not related to showing groups of measurements from SEG, but is related to showing other types of SRs. The screen shot shows does report and come from a SIemens does report object created on the modality.
There is also a DICOM initiative to add a quality report SR instance.

@fedorov fedorov added the IDC:candidate Possible feature requests for discussion, and if we agree, they can be relabeled IDC:priority label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDC:candidate Possible feature requests for discussion, and if we agree, they can be relabeled IDC:priority
Projects
None yet
Development

No branches or pull requests

5 participants