fix(3DSegmentation): [Bug] The viewports become blank when loading the seg file in advanced layout after closing the seg file from any other advanced layout (#5505)

This commit is contained in:
Vinícius Alves de Faria Resende authored and GitHub committed 2025-10-28 08:52:12 -04:00
1 parent afa9131da1
commit 76f7d4e23a
25 files changed
+189 -208

No files matched your search

+16 -4
View File
@@ -236,16 +236,28 @@ function commandsModule({
return;
}
const viewport = cornerstoneViewportService.getCornerstoneViewport(viewportId);
if (!viewport) {
return;
}
if (displaySet.isOverlayDisplaySet) {
// update the previously stored segmentationPresentation with the new viewportId
// presentation so that when we put the referencedDisplaySet back in the viewport
// it will have the correct segmentation representation hydrated
const segmentationType =
// Todo: check if PMAP modality should be handled such as SEG
displaySet.Modality !== 'SEG'
? SegmentationRepresentations.Contour
: viewport.type === CoreEnums.ViewportType.VOLUME_3D
? SegmentationRepresentations.Surface
: SegmentationRepresentations.Labelmap;
commandsManager.runCommand('updateStoredSegmentationPresentation', {
displaySet,
type:
displaySet.Modality === 'SEG'
? SegmentationRepresentations.Labelmap
: SegmentationRepresentations.Contour,
type: segmentationType,
});
}