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:
1 parent
c4902f2b9e
commit
78df8ff03a
3 files changed
+54
-10
No files matched your search
@@ -1335,10 +1335,23 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
|
||||
segmentationPresentation.forEach((presentationItem: SegmentationPresentationItem) => {
|
||||
const { segmentationId, type, hydrated } = presentationItem;
|
||||
|
||||
const { Labelmap, Surface } = csToolsEnums.SegmentationRepresentations;
|
||||
const representationType = (() => {
|
||||
if (type === Surface) {
|
||||
if (viewport.type === csEnums.ViewportType.VOLUME_3D) {
|
||||
return Surface;
|
||||
} else {
|
||||
return Labelmap;
|
||||
}
|
||||
}
|
||||
|
||||
return type;
|
||||
})();
|
||||
|
||||
if (hydrated) {
|
||||
segmentationService.addSegmentationRepresentation(viewport.id, {
|
||||
segmentationId,
|
||||
type,
|
||||
type: representationType,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user