feat: add support for DICOM Labelmap Segmentation Storage - #430
feat: add support for DICOM Labelmap Segmentation Storage#430igoroctaviano wants to merge 4 commits into
Conversation
Add onClick handler to SegmentItem to zoom to segment's bounding box when the segment label is clicked. This is consistent with the bulk annotation zoom behavior and provides a better UX than auto-zooming on visibility toggle. Changes: - Add onClick prop to SegmentItem and SegmentList components - Add handleSegmentClick method in SlideViewer - Update dicom-microscopy-viewer types with zoomToSegment method
Add support for Labelmap Segmentation (SOP Class UID 1.2.840.10008.5.1.4.1.1.66.7) as defined in DICOM Supplement 243. Key changes: - Add LABELMAP_SEGMENTATION to StorageClasses enum - Include LABELMAP_SEGMENTATION in GCP secondary store's storage classes - Update SlideViewer.loadDerivedDataset to handle both Segmentation and LabelmapSegmentation SOP Classes - Add series store caching in DicomWebManager to reduce 404 noise when using multi-store fallback (e.g., GCP query parameter for secondary stores) The series store caching remembers which store successfully served each series and tries that store first on subsequent requests, avoiding unnecessary 404 errors when loading frames from the correct store. Closes #271
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| JavaScript | Aug 31, 2026 12:48a.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
📦 Firebase Preview - Using Published DMVThis preview is using the published
|
|
Visit the preview URL for this PR (updated for commit b011a34): https://idc-external-006--pr430-feat-labelmap-segmen-4t837sy1.web.app (expires Mon, 07 Sep 2026 00:50:19 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 88aacecd98ba54d2f9c8d201a9444e43d1ad8307 |
📦 Firebase Preview - Using Published DMVThis preview is using the published
|
Prefix unused onClick destructure with underscore in SegmentItem.tsx (JS-0356)
📦 Firebase Preview - Using Published DMVThis preview is using the published
|
|
📦 Firebase Preview - Using Published DMVThis preview is using the published
|
|
@igoroctaviano @fedorov this is exciting progress! I created a dicom store using one of the labelmap segmentations from the test data bucket mentioned above to test this: The labelmap displays!
However there are definitely a few issues:
|
|
@CPBridge @fedorov thanks for testing this — I looked into the two issues and wanted to confirm the diagnosis and proposed fix before implementing. Color mismatch / color change hides the overlay Changing the color then calls Background class Proposed plan
Most of this lands in ImagingDataCommons/dicom-microscopy-viewer#281; Slim needs matching UI defaults and to skip auto-show for background. Does this approach make sense, especially the background identification and “listed but off by default” behavior? |
|
@igoroctaviano the color fixes sound good in outline though I don't follow the low level details Regarding background the following sounds self-contradictory to me in how it treats a segment coded as background but without a matching pixel padding value:
I think the "most correct" to do this would be to check |
|
@CPBridge you’re right — those two sentences contradicted each other. I’ll drop the “stays a normal overlay” part. Two clean options, as you framed them:
I’ll wait for @fedorov before locking that in. Color side I’ll treat as agreed in outline. |
|
I also think another option we should consider is just, once identified, hiding the background segment entirely |
Yes, I think that's what we do in dcmqi, and the long discussion is here (for completeness, or if Claude wants to read it sometime!): Slicer/Slicer#9163.
Yes, that too! Also, please add a note somewhere, if/when we get to creating LABELMAP in Slim, we should make sure we populate PixelPaddingValue! |




Summary
Add support for Labelmap Segmentation (SOP Class UID
1.2.840.10008.5.1.4.1.1.66.7) as defined in DICOM Supplement 243.LABELMAP_SEGMENTATIONtoStorageClassesenumLABELMAP_SEGMENTATIONin GCP secondary store's storage classesSlideViewer.loadDerivedDatasetto handle both Segmentation and LabelmapSegmentation SOP ClassesDicomWebManagerto reduce 404 noise when using multi-store fallback (e.g., GCP query parameter for secondary stores)The series store caching remembers which store successfully served each series and tries that store first on subsequent requests, avoiding unnecessary 404 errors when loading frames from the correct store.
Requires: ImagingDataCommons/dicom-microscopy-viewer#281
DMV Branch:
feat/labelmap-seg-supportTest plan
gs://idc-dicom-test-inventory/labelmap_examples/wsi/labelmap_monochrome_tiled_full_native/gcpquery parameterCloses #271