fix: add back clear segmentation representations (#5336)

This commit is contained in:
Pedro Köhler 2025-08-25 11:12:33 -03:00 committed by GitHub
parent 9b39719149
commit 21d6ba2bb3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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');
}