fix(segmentation): Changes to fix problems with non hydrated/loaded segmentations to be viewable when switching hanging protocols (e.g. MPR) (#5139)
This commit is contained in:
1 parent
9a81f8cef5
commit
c2624f116d
24 files changed
+199
-47
No files matched your search
@@ -65,15 +65,23 @@ export function configureViewportForLayerAddition(params: {
|
||||
viewport.viewportOptions.orientation = cornerstoneViewportService.getOrientation(viewportId);
|
||||
}
|
||||
|
||||
// Do not force volume for SEG and RTSTRUCT if there is only one display set
|
||||
if (requestedLayerDisplaySet.isOverlayDisplaySet && currentDisplaySetUIDs.length === 1) {
|
||||
viewport.viewportOptions.viewportType = 'stack';
|
||||
} else {
|
||||
viewport.viewportOptions.viewportType = 'volume';
|
||||
// If a viewport type was already set do not reset it.
|
||||
if (!viewport.viewportOptions.viewportType) {
|
||||
// Do not force volume for SEG and RTSTRUCT if there is only one display set
|
||||
if (requestedLayerDisplaySet.isOverlayDisplaySet && currentDisplaySetUIDs.length === 1) {
|
||||
viewport.viewportOptions.viewportType = 'stack';
|
||||
} else {
|
||||
viewport.viewportOptions.viewportType = 'volume';
|
||||
}
|
||||
}
|
||||
|
||||
// create same amount of display set options as the number of display set UIDs
|
||||
const displaySetOptions = allDisplaySetInstanceUIDs.map((uid, index) => {
|
||||
// There is already a display set option for this display set, so return it.
|
||||
if (viewport.displaySetOptions?.[index]) {
|
||||
return viewport.displaySetOptions[index];
|
||||
}
|
||||
|
||||
if (index === 0) {
|
||||
// no colormap for background
|
||||
return {};
|
||||
|
||||
Reference in new issue
Block a user