fix(ViewportGrid) fill blank viewports with display sets not yet in grid. (#3154)
* fix(ViewportGrid): In ViewportGrid, fill blank viewports with display sets not yet in grid. ViewportGridService now allows off-screen viewports to remain so that so as to maintain continuity if they were filled by the UI/user. * PR feedback: moved getNumViewportPanes into the ViewportGridService API. * PR feedback: - renamed some variables - proper import/export of IDisplaySet - added some comments for clarification - fixed broken e2e tests * Some missed rename of Services.
This commit is contained in:
1 parent
5e66faa45d
commit
f791a4cafb
8 files changed
+138
-33
No files matched your search
@@ -59,6 +59,13 @@ export default function toggleMPRHangingProtocol({
|
||||
viewports[activeViewportIndex].displaySetInstanceUIDs;
|
||||
|
||||
const errorCallback = error => {
|
||||
// Unable to create MPR, so be sure to return to the cached/original protocol.
|
||||
hangingProtocolService.setProtocol(
|
||||
cachedState.protocol.id,
|
||||
viewportMatchDetails,
|
||||
restoreErrorCallback
|
||||
);
|
||||
|
||||
uiNotificationService.show({
|
||||
title: 'Multiplanar reconstruction (MPR) ',
|
||||
message:
|
||||
@@ -276,13 +283,17 @@ function _getViewportsInfo({ protocol, stage, viewports, servicesManager }) {
|
||||
.filter(Boolean);
|
||||
|
||||
if (viewportIds.length) {
|
||||
toolOptions = viewportIds.map(viewportId => {
|
||||
const toolGroup = toolGroupService.getToolGroupForViewport(viewportId);
|
||||
return {
|
||||
toolGroupId: toolGroup.id,
|
||||
toolOptions: toolGroup.toolOptions,
|
||||
};
|
||||
});
|
||||
toolOptions = viewportIds
|
||||
.map(viewportId => {
|
||||
const toolGroup = toolGroupService.getToolGroupForViewport(viewportId);
|
||||
return toolGroup
|
||||
? {
|
||||
toolGroupId: toolGroup.id,
|
||||
toolOptions: toolGroup.toolOptions,
|
||||
}
|
||||
: null;
|
||||
})
|
||||
.filter(Boolean);
|
||||
}
|
||||
|
||||
return { viewportMatchDetails, viewportStructure, toolOptions };
|
||||
|
||||
Reference in new issue
Block a user