LT-275: Enabling measure flow on extra viewports
This commit is contained in:
parent
cc8f486204
commit
18935a7131
@ -66,7 +66,7 @@ Template.viewer.onCreated(() => {
|
|||||||
|
|
||||||
const patientId = instance.data.studies[0].patientId;
|
const patientId = instance.data.studies[0].patientId;
|
||||||
const filter = {
|
const filter = {
|
||||||
'patientId': patientId
|
patientId
|
||||||
};
|
};
|
||||||
|
|
||||||
const timepointsPromise = instance.data.timepointApi.retrieveTimepoints(filter);
|
const timepointsPromise = instance.data.timepointApi.retrieveTimepoints(filter);
|
||||||
@ -132,7 +132,7 @@ Template.viewer.events({
|
|||||||
OHIF.measurements.MeasurementHandlers.onRemoved(event, instance, eventData);
|
OHIF.measurements.MeasurementHandlers.onRemoved(event, instance, eventData);
|
||||||
},
|
},
|
||||||
CornerstoneToolsMouseClick(event, instance, data) {
|
CornerstoneToolsMouseClick(event, instance, data) {
|
||||||
const element = instance.$('.imageViewerViewport')[0];
|
const element = event.target;
|
||||||
|
|
||||||
const toolState = cornerstoneTools.getToolState(element, 'bidirectional');
|
const toolState = cornerstoneTools.getToolState(element, 'bidirectional');
|
||||||
|
|
||||||
@ -141,10 +141,6 @@ Template.viewer.events({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectLabelCallback = (options, value, description) => {
|
|
||||||
console.warn('>>>>options, value, description', options, value, description);
|
|
||||||
};
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
for (let i = 0; i < toolState.data.length; i++) {
|
for (let i = 0; i < toolState.data.length; i++) {
|
||||||
const toolData = toolState.data[i];
|
const toolData = toolState.data[i];
|
||||||
@ -154,8 +150,7 @@ Template.viewer.events({
|
|||||||
toolData,
|
toolData,
|
||||||
element,
|
element,
|
||||||
measurementApi: instance.data.measurementApi,
|
measurementApi: instance.data.measurementApi,
|
||||||
position: data.currentPoints.page,
|
position: data.currentPoints.page
|
||||||
callback: selectLabelCallback
|
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Template } from 'meteor/templating';
|
import { Template } from 'meteor/templating';
|
||||||
import { Blaze } from 'meteor/blaze';
|
import { Blaze } from 'meteor/blaze';
|
||||||
|
import { _ } from 'meteor/underscore';
|
||||||
import { OHIF } from 'meteor/ohif:core';
|
import { OHIF } from 'meteor/ohif:core';
|
||||||
|
|
||||||
const toolMap = {
|
const toolMap = {
|
||||||
@ -32,7 +33,9 @@ OHIF.measurements.toggleLabelButton = options => {
|
|||||||
hideCommon: true,
|
hideCommon: true,
|
||||||
toolType: options.toolData.toolType,
|
toolType: options.toolData.toolType,
|
||||||
doneCallback(location, description) {
|
doneCallback(location, description) {
|
||||||
options.callback(options, location, description);
|
if (_.isFunction(options.callback)) {
|
||||||
|
options.callback(options, location, description);
|
||||||
|
}
|
||||||
|
|
||||||
toolCollection.update(measurement._id, {
|
toolCollection.update(measurement._id, {
|
||||||
$set: {
|
$set: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user