feat(idc): instance-level SR qualitative annotations (TID 1500/1501)#129
Open
igoroctaviano wants to merge 13 commits into
Open
feat(idc): instance-level SR qualitative annotations (TID 1500/1501)#129igoroctaviano wants to merge 13 commits into
igoroctaviano wants to merge 13 commits into
Conversation
… Trigger release 3.12.3. (OHIF#6045)
…elease 3.12.5 (OHIF#6086) * Update playwright config to output html report and always include video. * Output playwright html report to results zip. * Fix MeasurementPanel.spec.ts to use new measurement row locator.
Implements OHIF#3358 in the IDC extension. When a TID 1500 Imaging Measurement Report contains a Measurement Group (TID 1501) with IMAGE content items and CODE content items but no geometric coordinates (SCOORD/SCOORD3D), the coded values are rendered as "concept: value" labels in the bottom-right viewport overlay over the referenced image instance (e.g. "Target Region: Neck"). A tooltip shows the code value / coding scheme designator and any modifiers. - extractInstanceAnnotations: pure TID 1500/1501 parser (+ unit tests) - instanceAnnotationStore: SOPInstanceUID -> annotations store with pub/sub - InstanceAnnotationsOverlay: viewport overlay item with tooltips - registerInstanceAnnotations: parses SR display sets and registers the viewportOverlay.bottomRight customization - wired into the extension onModeEnter; configurable via app config `instanceAnnotations` (enabled/maxLabels/showColor/colors)
Color was derived from the concept name, so annotations sharing a concept (e.g. two "Finding Site" items) rendered with an identical dot and looked like "no colors". Derive the color from the coded value instead (falling back to value text, then concept label) so distinct findings get distinct colors, color the value text as well, and slightly enlarge the dot for visibility.
Collaborator
Author
|
@fedorov feel free to test this one |
…-sr-qualitative-annotations v3.12.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements OHIF/Viewers#3358 — support for instance-level SR qualitative annotations — entirely within the IDC extension (
extensions/idc), per the request to have it available as an extension in the IDC fork.When a study contains a DICOM SR (TID 1500 Imaging Measurement Report) whose Measurement Group (TID 1501) holds one or more
IMAGEcontent items and one or moreCODEcontent items, but no geometric coordinates (SCOORD/SCOORD3D), the coded values are rendered asconcept: valuelabels over the referenced image instance (e.g.Target Region: Neck). Hovering a label reveals the code value / coding scheme designator and any modifiers (subordinate codes), addressing the modifier concern raised in the issue thread (OHIF#3108).What's included
extractInstanceAnnotations— pure TID 1500/1501 parser that walksImaging Measurements → Measurement Group, skips geometric groups, and maps each referenced SOP Instance UID to its qualitative codes (+ modifiers, tracking identifier).instanceAnnotationStore—SOPInstanceUID → annotationsstore with a lightweight pub/sub so the overlay re-renders once SRs finish loading.InstanceAnnotationsOverlay— viewport overlay item renderingconcept: valuelabels with an optional colored dot and a tooltip (code value / scheme / modifiers).registerInstanceAnnotations— parses already-loaded and future SR display sets and appends the item toviewportOverlay.bottomRightvia the customization service.onModeEnter(the IDC extension's lifecycle hooks run globally), so no mode changes are required. Configurable/disable-able via app configinstanceAnnotations(enabled,maxLabels,showColor,colors).Design notes
CODE/IMAGEcontent items live directly in instance metadata, so no bulk-data load is needed before parsing.Test plan
extractInstanceAnnotations.test.ts): extracts codes from the issue's example, captures modifiers, ignores geometric groups, ignores groups without an IMAGE reference, handles empty input. Run:npx jest --projects extensions/idc/jest.config.js.1.3.6.1.4.1.32722.99.99.62087908186665265759322018723889952421) and verify labels appear on the referenced instances with working tooltips, and that scrolling updates them per instance.Closes OHIF#3358