Don't set vtk on viewport's layout; rely on viewportSpecificData

This commit is contained in:
dannyrb 2019-06-18 14:51:51 -04:00
parent aa811dffe3
commit 32b420087b
4 changed files with 9 additions and 10 deletions

View File

@ -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'
);
}
}

View File

@ -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;

View File

@ -33,7 +33,7 @@ export default function setMPRLayout(displaySet) {
}*/
const data = {
plugin: 'vtk',
// plugin: 'vtk',
vtk: {
mode: 'mpr', // TODO: not used
afterCreation: api => {

View File

@ -14,7 +14,7 @@ export default function setViewportToVTK(
}*/
const data = {
plugin: 'vtk',
// plugin: 'vtk',
vtk: {
mode: 'mpr', // TODO: not used
afterCreation: api => {