fix: Segmentation not displayed and unable to draw segments in volume viewport after converting Labelmap to Surface (#5488)

* fix: unable to draw segment after 3d layout

* comment update

---------
This commit is contained in:
Devu-trenser authored and GitHub committed 2025-10-15 09:35:26 -04:00
1 parent 05ecdfe512
commit faea09e7ef
2 files changed
+10 -17

No files matched your search

@@ -65,13 +65,11 @@ const segmentationRepresentationModifiedCallback = async (
return;
}
// whatever type the source viewport has, we need to add that to the target viewport
const sourceViewportRepresentation = segmentationService.getSegmentationRepresentations(
sourceViewport.viewportId,
{ segmentationId }
);
const type = sourceViewportRepresentation[0].type;
// Ensure the segmentation representation aligns with the target viewport type.
const type: Enums.SegmentationRepresentations =
viewport.type === CoreEnums.ViewportType.VOLUME_3D
? Enums.SegmentationRepresentations.Surface
: Enums.SegmentationRepresentations.Labelmap;
await segmentationService.addSegmentationRepresentation(targetViewportId, {
segmentationId,