Viewers
Viewers copied to clipboard
fix: 2965 Correct Parsing Logic for Qualitative Instance Level SR
Fix for https://github.com/OHIF/Viewers/issues/2965
Explanation below: Qualitative slice-level SR annotations are within the Measurement Group container, which is obtained through https://github.com/OHIF/Viewers/blob/7aba01f534b70406ce02e1708004141c7b773904/platform/core/src/DICOMSR/SCOORD3D/parseSCOORD3D.js#L31 Reference images are not required for slice level annotations, moreover it wasn't used anywhere in the code.
This particular dataset did not have any ImageLibrary, hence getReferenceImagesList() was throwing errors. The fix Davide put in there is essentially what https://github.com/OHIF/Viewers/blob/7aba01f534b70406ce02e1708004141c7b773904/platform/core/src/DICOMSR/SCOORD3D/utils/getMeasurements.js#L6 does. I reverted his changes from platform/core/src/DICOMSR/SCOORD3D/utils/getReferencedImagesList.js as it should not look for CodeValue from ImagingMeasurements.
Codecov Report
Merging #2972 (a368453) into master (fe57c00) will decrease coverage by
0.73%
. The diff coverage is2.11%
.
@@ Coverage Diff @@
## master #2972 +/- ##
==========================================
- Coverage 12.68% 11.94% -0.74%
==========================================
Files 306 307 +1
Lines 8233 8448 +215
Branches 1593 1677 +84
==========================================
- Hits 1044 1009 -35
- Misses 5797 5954 +157
- Partials 1392 1485 +93
Impacted Files | Coverage Δ | |
---|---|---|
...latform/core/src/DICOMSR/SCOORD3D/parseSCOORD3D.js | 2.63% <0.00%> (-0.76%) |
:arrow_down: |
.../core/src/DICOMSR/SCOORD3D/utils/addMeasurement.js | 5.40% <ø> (ø) |
|
.../DICOMSR/SCOORD3D/utils/getReferencedImagesList.js | 6.25% <0.00%> (-0.90%) |
:arrow_down: |
...re/src/DICOMSR/SCOORD3D/utils/getRenderableData.js | 1.72% <0.00%> (-0.07%) |
:arrow_down: |
...orm/core/src/DICOMSR/parseDicomStructuredReport.js | 7.50% <0.00%> (-1.60%) |
:arrow_down: |
platform/core/src/classes/HotkeysManager.js | 76.66% <0.00%> (ø) |
|
platform/core/src/classes/StudyLoadingListener.js | 1.03% <0.00%> (+0.01%) |
:arrow_up: |
...latform/core/src/classes/metadata/StudyMetadata.js | 1.25% <0.00%> (-0.04%) |
:arrow_down: |
.../core/src/measurements/tools/dicomSRDisplayTool.js | 50.00% <0.00%> (ø) |
|
.../src/studies/services/wado/studyInstanceHelpers.js | 1.56% <0.00%> (-0.48%) |
:arrow_down: |
... and 25 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 7aba01f...a368453. Read the comment docs.
I second @sedghi - @GitanjaliChhetri can you please summarize what this PR is doing and why?
Updated the description to explain the fix,
@GitanjaliChhetri can you please include specific SR samples that you are using to guide the development in this PR and test the revised code?
Reference images are not required for slice level annotations, moreover it wasn't used anywhere in the code.
What do you mean by "reference images" here?
I reverted his changes from platform/core/src/DICOMSR/SCOORD3D/utils/getReferencedImagesList.js as it should not look for CodeValue from ImagingMeasurements.
I am not sure I understand what this means either ("as it should not look for CodeValue from ImagingMeasurements").
@fedorov Please see the investigation details below:
This issue was opened to double check the fix done for https://github.com/OHIF/Viewers/issues/2935.
What was the bug? Failed to parse the SR display set (dataset here: https://github.com/OHIF/Viewers/issues/2935#issue-1376381753) What caused the error? Incomplete check at https://github.com/GitanjaliChhetri/Viewers/blob/7aba01f534b70406ce02e1708004141c7b773904/platform/core/src/DICOMSR/SCOORD3D/utils/getReferencedImagesList.js#L15 while searching the SR content tree for the Image Library (TID 1600) Content item.
TID 1501 (Measurement group) content is obtained from https://github.com/GitanjaliChhetri/Viewers/blob/7aba01f534b70406ce02e1708004141c7b773904/platform/core/src/DICOMSR/SCOORD3D/parseSCOORD3D.js#L31 Also note that references to image objects (for annotations, coordinates) are encoded with a value type of IMAGE using TID 1410. https://github.com/GitanjaliChhetri/Viewers/blob/7aba01f534b70406ce02e1708004141c7b773904/platform/core/src/DICOMSR/SCOORD3D/utils/processMeasurement.js#L4
Few other SR samples I used for regression testing can be found in these older issues - https://github.com/OHIF/Viewers/issues/2797#issue-1230119261 https://github.com/OHIF/Viewers/issues/2797#issuecomment-1167820978 https://github.com/OHIF/Viewers/issues/2852
I let @igoroctaviano review first
@GitanjaliChhetri can you please include specific SR samples that you are using to guide the development in this PR and test the revised code? Included in my response.
Reference images are not required for slice level annotations, moreover it wasn't used anywhere in the code.
What do you mean by "reference images" here? I think 'referencedImages' at https://github.com/OHIF/Viewers/blob/7aba01f534b70406ce02e1708004141c7b773904/platform/core/src/DICOMSR/SCOORD3D/parseSCOORD3D.js#L30 is a slightly confusing object name because this object is returned from the Image Library Container within the TID 1600 template. This is not the IMAGE content item within the Measurement group container.
I reverted his changes from platform/core/src/DICOMSR/SCOORD3D/utils/getReferencedImagesList.js as it should not look for CodeValue from ImagingMeasurements.
I am not sure I understand what this means either ("as it should not look for CodeValue from ImagingMeasurements").
I meant that while searching the SR content tree for the Image Library Container, we should not be looking into the of Imaging Measurements container. Hence I reverted that portion of the fix.