Fixes to make Lesion Tracker work

This commit is contained in:
Erik Ziegler 2017-01-16 21:34:06 +01:00 committed by Emanuel F. Oliveira
parent 5fcf167726
commit 30a50c7ade
12 changed files with 24 additions and 20 deletions

View File

@ -17,10 +17,7 @@ tracker@1.1.1 # Meteor's client-side reactive programming librar
es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers. es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers.
ecmascript@0.6.1 # Enable ECMAScript2015+ syntax in app code ecmascript@0.6.1 # Enable ECMAScript2015+ syntax in app code
clinical:router
clinical:extended-api
clinical:active-entry clinical:active-entry
clinical:error-pages
clinical:theming clinical:theming
clinical:fonts clinical:fonts
clinical:hipaa-audit-log clinical:hipaa-audit-log

View File

@ -26,15 +26,9 @@ callback-hook@1.0.10
check@1.2.4 check@1.2.4
clinical:active-entry@1.5.16 clinical:active-entry@1.5.16
clinical:auto-resizing@0.2.0 clinical:auto-resizing@0.2.0
clinical:error-pages@0.2.0
clinical:extended-api@2.2.4
clinical:fonts@1.1.4 clinical:fonts@1.1.4
clinical:hipaa-audit-log@2.4.2 clinical:hipaa-audit-log@2.4.2
clinical:hipaa-logger@1.0.1 clinical:hipaa-logger@1.0.1
clinical:router@2.0.19
clinical:router-location@2.1.0
clinical:router-middleware-stack@2.1.2
clinical:router-url@2.1.0
clinical:theming@0.4.10 clinical:theming@0.4.10
coffeescript@1.11.1_4 coffeescript@1.11.1_4
ddp@1.2.5 ddp@1.2.5

View File

@ -247,7 +247,7 @@ Template.toolbarSection.events({
Template.toolbarSection.onRendered(function() { Template.toolbarSection.onRendered(function() {
// Set disabled/enabled tool buttons that are set in toolManager // Set disabled/enabled tool buttons that are set in toolManager
const states = toolManager.getToolDefaultStates(); const states = Viewerbase.toolManager.getToolDefaultStates();
const disabledToolButtons = states.disabledToolButtons; const disabledToolButtons = states.disabledToolButtons;
const allToolbarButtons = $('.toolbarSection').find('.toolbarSectionButton:not(.nonAutoDisableState)'); const allToolbarButtons = $('.toolbarSection').find('.toolbarSectionButton:not(.nonAutoDisableState)');

View File

@ -5,11 +5,15 @@ import { OHIF } from 'meteor/ohif:core';
import 'meteor/ohif:viewerbase'; import 'meteor/ohif:viewerbase';
import { _ } from 'meteor/underscore'; import { _ } from 'meteor/underscore';
// @TODO: Figure out what to change so we don't have this duplicate import (export createStacks?)
import { Viewerbase } from 'meteor/ohif:viewerbase';
Session.set('ViewerMainReady', false); Session.set('ViewerMainReady', false);
Session.set('TimepointsReady', false); Session.set('TimepointsReady', false);
Session.set('MeasurementsReady', false); Session.set('MeasurementsReady', false);
Template.viewer.onCreated(() => { Template.viewer.onCreated(() => {
const toolManager = Viewerbase.toolManager;
ViewerData = window.ViewerData || ViewerData; ViewerData = window.ViewerData || ViewerData;
const instance = Template.instance(); const instance = Template.instance();
@ -65,7 +69,7 @@ Template.viewer.onCreated(() => {
instance.data.studies.forEach(study => { instance.data.studies.forEach(study => {
study.selected = true; study.selected = true;
study.displaySets = createStacks(study); study.displaySets = Viewerbase.createStacks(study);
ViewerStudies.insert(study); ViewerStudies.insert(study);
}); });

View File

@ -12,7 +12,7 @@ Package.onUse(function (api) {
api.use([ api.use([
'meteor-platform', 'meteor-platform',
'templating', 'templating',
'clinical:router@2.0.17', 'iron:router@1.0.13',
'grove:less@0.1.1', 'grove:less@0.1.1',
'session', 'session',
'reactive-dict' 'reactive-dict'
@ -78,7 +78,7 @@ Package.onUse(function (api) {
Package.onTest(function (api) { Package.onTest(function (api) {
api.use([ api.use([
'templating', 'templating',
'clinical:router@2.0.13', 'iron:router@1.0.13',
'grove:less@0.1.1', 'grove:less@0.1.1',
'standard-app-packages' 'standard-app-packages'
], ['client']); ], ['client']);

View File

@ -13,7 +13,7 @@ Package.on_use(function (api) {
api.use('mrt:moment@2.8.1', 'client'); api.use('mrt:moment@2.8.1', 'client');
api.use('grove:less@0.1.1', 'client'); api.use('grove:less@0.1.1', 'client');
api.use('clinical:router@2.0.17'); api.use('iron:router@1.0.13');
api.use('clinical:fonts@1.0.0', 'client'); api.use('clinical:fonts@1.0.0', 'client');
api.use('clinical:auto-resizing@0.1.2', 'client'); api.use('clinical:auto-resizing@0.1.2', 'client');
api.use('clinical:hipaa-logger@1.0.0'); api.use('clinical:hipaa-logger@1.0.0');

View File

@ -16,7 +16,6 @@ Package.onUse(function(api) {
api.use('reactive-var'); api.use('reactive-var');
// Router dependencies // Router dependencies
// api.use('clinical:router@2.0.18', 'client');
api.use('iron:router@1.0.13', 'client'); api.use('iron:router@1.0.13', 'client');
// Component's library dependencies // Component's library dependencies

View File

@ -1,5 +1,6 @@
import { toolManager } from 'meteor/ohif:viewerbase'; import { toolManager } from 'meteor/ohif:viewerbase';
import { OHIF } from 'meteor/ohif:core'; import { OHIF } from 'meteor/ohif:core';
import { Viewerbase } from 'meteor/ohif:viewerbase';
(function($, cornerstone, cornerstoneMath, cornerstoneTools) { (function($, cornerstone, cornerstoneMath, cornerstoneTools) {
@ -7,7 +8,7 @@ import { OHIF } from 'meteor/ohif:core';
var toolType = 'bidirectional'; var toolType = 'bidirectional';
const shadowConfig = toolManager.getToolDefaultStates().shadowConfig; const shadowConfig = Viewerbase.toolManager.getToolDefaultStates().shadowConfig;
var configuration = { var configuration = {
getMeasurementLocationCallback: getMeasurementLocationCallback, getMeasurementLocationCallback: getMeasurementLocationCallback,

View File

@ -1,5 +1,5 @@
import { OHIF } from 'meteor/ohif:core'; import { OHIF } from 'meteor/ohif:core';
import { toolManager } from 'meteor/ohif:viewerbase'; import { Viewerbase } from 'meteor/ohif:viewerbase';
(function($, cornerstone, cornerstoneMath, cornerstoneTools) { (function($, cornerstone, cornerstoneMath, cornerstoneTools) {
@ -7,7 +7,7 @@ import { toolManager } from 'meteor/ohif:viewerbase';
const toolType = 'nonTarget'; const toolType = 'nonTarget';
const shadowConfig = toolManager.getToolDefaultStates().shadowConfig; const shadowConfig = Viewerbase.toolManager.getToolDefaultStates().shadowConfig;
const configuration = { const configuration = {
getMeasurementLocationCallback: getMeasurementLocationCallback, getMeasurementLocationCallback: getMeasurementLocationCallback,

View File

@ -1,4 +1,5 @@
import { OHIF } from 'meteor/ohif:core'; import { OHIF } from 'meteor/ohif:core';
import { Viewerbase } from 'meteor/ohif:viewerbase';
Meteor.startup(function() { Meteor.startup(function() {
StudyList.callbacks['dblClickOnStudy'] = dblClickOnStudy; StudyList.callbacks['dblClickOnStudy'] = dblClickOnStudy;
@ -13,7 +14,7 @@ Meteor.startup(function() {
*/ */
function dblClickOnStudy(data) { function dblClickOnStudy(data) {
// Use the formatPN template helper to clean up the patient name // Use the formatPN template helper to clean up the patient name
let title = formatPN(data.patientName); let title = Viewerbase.helpers.formatPN(data.patientName);
const instance = Template.instance(); const instance = Template.instance();

View File

@ -1,4 +1,5 @@
import { OHIF } from 'meteor/ohif:core'; import { OHIF } from 'meteor/ohif:core';
import { Viewerbase } from 'meteor/ohif:viewerbase';
/** /**
* Show / hide lesion tracker tools * Show / hide lesion tracker tools
@ -10,6 +11,8 @@ let previousActiveTool;
let toolsShown = true; let toolsShown = true;
OHIF.lesiontracker.toggleLesionTrackerTools = () => { OHIF.lesiontracker.toggleLesionTrackerTools = () => {
const toolManager = Viewerbase.toolManager;
if (toolsShown === true) { if (toolsShown === true) {
// Save the current settings for later // Save the current settings for later
previousStates = toolManager.getToolDefaultStates(); previousStates = toolManager.getToolDefaultStates();
@ -43,6 +46,7 @@ OHIF.lesiontracker.toggleLesionTrackerTools = () => {
}; };
OHIF.lesiontracker.toggleLesionTrackerToolsButtons = (isEnabled) => { OHIF.lesiontracker.toggleLesionTrackerToolsButtons = (isEnabled) => {
const toolManager = Viewerbase.toolManager;
const toolStates = previousStates || toolManager.getToolDefaultStates(); const toolStates = previousStates || toolManager.getToolDefaultStates();
if (isEnabled) { if (isEnabled) {

View File

@ -1,4 +1,9 @@
import { Meteor } from 'meteor/meteor';
import { Viewerbase } from 'meteor/ohif:viewerbase';
Meteor.startup(function() { Meteor.startup(function() {
const toolManager = Viewerbase.toolManager;
toolManager.addTool('bidirectional', { toolManager.addTool('bidirectional', {
mouse: cornerstoneTools.bidirectional, mouse: cornerstoneTools.bidirectional,
touch: cornerstoneTools.bidirectionalTouch touch: cornerstoneTools.bidirectionalTouch
@ -53,5 +58,4 @@ Meteor.startup(function() {
} }
toolManager.setToolDefaultStates(currentDefaultStates); toolManager.setToolDefaultStates(currentDefaultStates);
}); });