fix(segmentation): Segmentation not displayed and unable to draw segments when switching back to volume/stack viewport from 3D viewport (#5430)

Co-authored-by: Vinicius Faria <viniciusfariaresende@gmail.com>
This commit is contained in:
Devu-trenserandVinicius Faria authored and GitHub committed 2025-10-07 18:40:32 -03:00
1 parent c4902f2b9e
commit 78df8ff03a
3 files changed
+54 -10

No files matched your search

@@ -295,10 +295,12 @@ class SegmentationService extends PubSubService {
const colorLUTIndex = this._segmentationIdToColorLUTIndexMap.get(segmentationId);
const defaultRepresentationType = LABELMAP;
let representationTypeToUse = type || defaultRepresentationType;
let isConverted = false;
const defaultRepresentationType: csToolsEnums.SegmentationRepresentations =
csViewport.type === ViewportType.VOLUME_3D ? SURFACE : LABELMAP;
let representationTypeToUse = type || defaultRepresentationType;
if (representationTypeToUse === LABELMAP) {
const { isVolumeViewport, isVolumeSegmentation } = this.determineViewportAndSegmentationType(
csViewport,