Working with latest cornerstone and cornerstoneTools versions.

This commit is contained in:
James Petts 2018-10-23 15:53:24 +01:00
parent 1887df2dc5
commit 7bf059ad05
6 changed files with 19 additions and 27 deletions

View File

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

View File

@ -267,9 +267,7 @@ const loadDisplaySetIntoViewport = (data, templateData) => {
cornerstoneTools.playClip(element); cornerstoneTools.playClip(element);
} }
// Enabling new eventDispatches form cornerstoneTools v3 // InstantiateTools on the new 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

@ -107,20 +107,20 @@ Meteor.startup(function() {
// Register the tool switching commands // Register the tool switching commands
registerToolCommands({ registerToolCommands({
wwwc: 'W/L', Wwwc: 'W/L',
zoom: 'Zoom', Zoom: 'Zoom',
angle: 'Angle Measurement', Angle: 'Angle Measurement',
probe: 'Pixel Probe', DragProbe: 'Pixel Probe',
stackScroll: 'Stack Scroll', StackScroll: 'Stack Scroll',
ellipticalRoi: 'Elliptical ROI', EllipticalRoi: 'Elliptical ROI',
rectangleRoi: 'Rectangle ROI', RectangleRoi: 'Rectangle ROI',
magnify: 'Magnify', Magnify: 'Magnify',
arrowAnnotate: 'Annotate', ArrowAnnotate: 'Annotate',
stackScrollMouseWheel: 'Scroll Stack Mouse Wheel', stackScrollMouseWheel: 'Scroll Stack Mouse Wheel',
pan: 'Pan', Pan: 'Pan',
length: 'Length Measurement', Length: 'Length Measurement',
wwwcRegion: 'W/L by Region', WwwcRegion: 'W/L by Region',
crosshairs: 'Crosshairs' Crosshairs: 'Crosshairs'
}); });
// Functions to register the viewport commands // Functions to register the viewport commands

View File

@ -27,12 +27,8 @@ 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',
@ -139,8 +135,6 @@ 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;

View File

@ -32,7 +32,7 @@ ohif:measurement-table
aldeed:template-extension aldeed:template-extension
aldeed:simple-schema@1.5.3 aldeed:simple-schema@1.5.3
stylus@2.513.9 stylus@=2.513.14
clinical:router clinical:router
session@1.1.7 session@1.1.7
cultofcoders:persistent-session cultofcoders:persistent-session

View File

@ -126,7 +126,7 @@ Template.toolbarSection.helpers({
const buttonData = []; const buttonData = [];
buttonData.push({ buttonData.push({
id: 'stackScroll', id: 'StackScroll',
title: 'Stack Scroll', title: 'Stack Scroll',
classes: 'imageViewerTool', classes: 'imageViewerTool',
iconClasses: 'fa fa-bars' iconClasses: 'fa fa-bars'
@ -260,9 +260,9 @@ Template.toolbarSection.onRendered(function() {
instance.$('#layout').dropdown(); instance.$('#layout').dropdown();
// TODO: Figure out a way to disable/enable the buttons with each status from // TODO: Figure out a way to disable/enable the buttons with each status from
// New API // New API
// const states = OHIF.viewerbase.toolManager.getToolDefaultStates(); // const states = OHIF.viewerbase.toolManager.getToolDefaultStates();
// const disabledToolButtons = states.disabledToolButtons; // const disabledToolButtons = states.disabledToolButtons;
// const allToolbarButtons = $('#toolbar').find('button'); // const allToolbarButtons = $('#toolbar').find('button');