fix: add back clear segmentation representations (#5336)

This commit is contained in:
Pedro Köhler authored and GitHub committed 2025-08-25 10:12:33 -04:00
1 parent 9b39719149
commit 21d6ba2bb3
1 file changed
+5
@@ -417,6 +417,11 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
// and we would lose the presentation.
this.storePresentation({ viewportId: viewportInfo.getViewportId() });
// Todo: i don't like this here, move it
this.servicesManager.services.segmentationService.clearSegmentationRepresentations(
viewportInfo.getViewportId()
);
if (!viewportInfo) {
throw new Error('element is not enabled for the given viewportId');
}