fix(TMTV): Consider blend mode when adding segmentation representations. OHIF-2416, OHIF-2369 (#5735)

* Updated screenshots for failing tests due to FOV improvements.

---------

Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
This commit is contained in:
Joe BoccanfusoandBill Wallace authored and GitHub committed 2026-01-27 08:47:29 -05:00
1 parent 0321361e2c
commit 06612fe177
45 files changed
+289 -276

No files matched your search

@@ -91,7 +91,7 @@ const segmentationRepresentationModifiedCallback = async (
type,
config: {
blendMode:
viewport.getBlendMode() === 1 ? BlendModes.LABELMAP_EDGE_PROJECTION_BLEND : undefined,
viewport?.getBlendMode?.() === 1 ? BlendModes.LABELMAP_EDGE_PROJECTION_BLEND : undefined,
},
});
};
@@ -38,6 +38,7 @@ import { usePositionPresentationStore } from '../../stores/usePositionPresentati
import { useSynchronizersStore } from '../../stores/useSynchronizersStore';
import { useSegmentationPresentationStore } from '../../stores/useSegmentationPresentationStore';
import getClosestOrientationFromIOP from '../../utils/isReferenceViewable';
import { BlendModes } from '@cornerstonejs/core/enums';
const EVENTS = {
VIEWPORT_DATA_CHANGED: 'event::cornerstoneViewportService:viewportDataChanged',
@@ -1192,6 +1193,10 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
segmentationId,
predecessorImageId,
type: representationType,
config: {
blendMode:
viewport?.getBlendMode?.() === 1 ? BlendModes.LABELMAP_EDGE_PROJECTION_BLEND : undefined,
},
});
// store the segmentation presentation id in the viewport info
@@ -1457,6 +1462,12 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
segmentationService.addSegmentationRepresentation(viewport.id, {
segmentationId,
type: representationType,
config: {
blendMode:
viewport?.getBlendMode?.() === 1
? BlendModes.LABELMAP_EDGE_PROJECTION_BLEND
: undefined,
},
});
}
});