From 32b420087bcba51f25dc85cca03b36e3187c7fd4 Mon Sep 17 00:00:00 2001 From: dannyrb Date: Tue, 18 Jun 2019 14:51:51 -0400 Subject: [PATCH] Don't set vtk on viewport's layout; rely on viewportSpecificData --- .../src/OHIFCornerstoneViewport.js | 8 +++++--- extensions/ohif-cornerstone-extension/src/config.js | 7 ++----- extensions/ohif-vtk-extension/src/utils/setMPRLayout.js | 2 +- .../ohif-vtk-extension/src/utils/setViewportToVTK.js | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/extensions/ohif-cornerstone-extension/src/OHIFCornerstoneViewport.js b/extensions/ohif-cornerstone-extension/src/OHIFCornerstoneViewport.js index b3e150e4e..1c1e1d789 100644 --- a/extensions/ohif-cornerstone-extension/src/OHIFCornerstoneViewport.js +++ b/extensions/ohif-cornerstone-extension/src/OHIFCornerstoneViewport.js @@ -78,11 +78,11 @@ class OHIFCornerstoneViewport extends Component { } if (!studyInstanceUid) { - throw new Error('StudyInstanceUID not provided.') + throw new Error('StudyInstanceUID not provided.'); } if (!displaySetInstanceUid) { - throw new Error('StudyInstanceUID not provided.') + throw new Error('StudyInstanceUID not provided.'); } // Create shortcut to displaySet @@ -125,7 +125,9 @@ class OHIFCornerstoneViewport extends Component { if (index > -1) { stack.currentImageIdIndex = index; } else { - console.warn('SOPInstanceUID provided was not found in specified DisplaySet'); + console.warn( + 'SOPInstanceUID provided was not found in specified DisplaySet' + ); } } diff --git a/extensions/ohif-cornerstone-extension/src/config.js b/extensions/ohif-cornerstone-extension/src/config.js index 4127c0901..b8f75e7bf 100644 --- a/extensions/ohif-cornerstone-extension/src/config.js +++ b/extensions/ohif-cornerstone-extension/src/config.js @@ -1,7 +1,7 @@ +import Hammer from 'hammerjs'; import cornerstone from 'cornerstone-core'; import cornerstoneMath from 'cornerstone-math'; import cornerstoneTools from 'cornerstone-tools'; -import Hammer from 'hammerjs'; // For debugging window.cornerstoneTools = cornerstoneTools; @@ -17,12 +17,9 @@ const fontFamily = 'Roboto, OpenSans, HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif'; cornerstoneTools.textStyle.setFont(`16px ${fontFamily}`); -// Set the tool width +// Tool styles/colors cornerstoneTools.toolStyle.setToolWidth(2); -// Set color for inactive tools cornerstoneTools.toolColors.setToolColor('rgb(255, 255, 0)'); - -// Set color for active tools cornerstoneTools.toolColors.setActiveColor('rgb(0, 255, 0)'); cornerstoneTools.store.state.touchProximity = 40; diff --git a/extensions/ohif-vtk-extension/src/utils/setMPRLayout.js b/extensions/ohif-vtk-extension/src/utils/setMPRLayout.js index 65570887d..f7f7039dc 100644 --- a/extensions/ohif-vtk-extension/src/utils/setMPRLayout.js +++ b/extensions/ohif-vtk-extension/src/utils/setMPRLayout.js @@ -33,7 +33,7 @@ export default function setMPRLayout(displaySet) { }*/ const data = { - plugin: 'vtk', + // plugin: 'vtk', vtk: { mode: 'mpr', // TODO: not used afterCreation: api => { diff --git a/extensions/ohif-vtk-extension/src/utils/setViewportToVTK.js b/extensions/ohif-vtk-extension/src/utils/setViewportToVTK.js index c018ba909..41d6db8d9 100644 --- a/extensions/ohif-vtk-extension/src/utils/setViewportToVTK.js +++ b/extensions/ohif-vtk-extension/src/utils/setViewportToVTK.js @@ -14,7 +14,7 @@ export default function setViewportToVTK( }*/ const data = { - plugin: 'vtk', + // plugin: 'vtk', vtk: { mode: 'mpr', // TODO: not used afterCreation: api => {