diff --git a/extensions/vtk/src/commandsModule.js b/extensions/vtk/src/commandsModule.js index 901b2a853..dcd1e2d7e 100644 --- a/extensions/vtk/src/commandsModule.js +++ b/extensions/vtk/src/commandsModule.js @@ -17,6 +17,7 @@ const { BlendMode } = Constants; const commandsModule = ({ commandsManager, UINotificationService }) => { // TODO: Put this somewhere else let apis = {}; + let defaultVOI; async function _getActiveViewportVTKApi(viewports) { const { @@ -119,9 +120,11 @@ const commandsModule = ({ commandsManager, UINotificationService }) => { return apis[index]; }, resetMPRView() { - apis.forEach(api => { - api.resetOrientation(); - }); + // Reset orientation + apis.forEach(api => api.resetOrientation()); + + // Reset VOI + if (defaultVOI) setVOI(defaultVOI); // Reset the crosshairs apis[0].svgWidgets.rotatableCrosshairsWidget.resetCrosshairs(apis, 0); @@ -172,7 +175,7 @@ const commandsModule = ({ commandsManager, UINotificationService }) => { segmentNumber, frameIndex, frame, - done = () => {}, + done = () => { }, }) => { let api = apis[viewports.activeViewportIndex]; @@ -387,6 +390,7 @@ const commandsModule = ({ commandsManager, UINotificationService }) => { // Get current VOI if cornerstone viewport. const cornerstoneVOI = getVOIFromCornerstoneViewport(); + defaultVOI = cornerstoneVOI; const viewportProps = [ {