Kind of working, updated cornerstone-core lib.

This commit is contained in:
James Petts 2018-10-23 12:21:21 +01:00
parent 548dddfc93
commit 1887df2dc5
3 changed files with 11 additions and 2 deletions

View File

@ -6,7 +6,7 @@ Package.describe({
Npm.depends({ Npm.depends({
hammerjs: '2.0.8', hammerjs: '2.0.8',
'cornerstone-core': '2.2.4', 'cornerstone-core': '2.2.6',
'cornerstone-tools': '3.0.0-b.959', 'cornerstone-tools': '3.0.0-b.959',
'cornerstone-math': '0.1.6', 'cornerstone-math': '0.1.6',
'dicom-parser': '1.8.0', 'dicom-parser': '1.8.0',

View File

@ -268,7 +268,8 @@ const loadDisplaySetIntoViewport = (data, templateData) => {
} }
// Enabling new eventDispatches form cornerstoneTools v3 // Enabling new eventDispatches form cornerstoneTools v3
//cornerstoneTools.addEnabledElement(element); //cornerstoneTools.addEnabledElement(element); NOTE: This should be done by cTools internally now, no?
console.log('====imageViewerViewport, instantiateTools');
toolManager.instantiateTools(element); toolManager.instantiateTools(element);
// Use the tool manager to enable the currently active tool for this // Use the tool manager to enable the currently active tool for this

View File

@ -27,8 +27,12 @@ export const toolManager = {
toolManager.setDefaultTool(OHIF.viewer.defaultTool); toolManager.setDefaultTool(OHIF.viewer.defaultTool);
} }
console.log('======INITIALIZING CORNERSTONETOOLS======');
cornerstoneTools.init(); cornerstoneTools.init();
console.log('======CORNERSTONETOOLS INITIALIZED======');
tools = [ tools = [
'Length', 'Length',
'Angle', 'Angle',
@ -135,6 +139,8 @@ export const toolManager = {
toolManager.init(); toolManager.init();
} }
console.log("toolManager.getActiveTool");
// If activeTool is not defined, we should set as defaultTool // If activeTool is not defined, we should set as defaultTool
if (!activeTool) { if (!activeTool) {
activeTool = defaultTool; activeTool = defaultTool;
@ -159,3 +165,5 @@ export const toolManager = {
// //
} }
}; };
toolManager.init();