LT-275: Adding button to add labels to measurements
This commit is contained in:
1 parent
b1eb68521a
commit
3f0b9482d1
13 files changed
+77
-13
No files matched your search
@@ -0,0 +1 @@
|
||||
import './viewer/imageViewerViewport.js';
|
||||
@@ -0,0 +1,27 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
Template.imageViewerViewport.events({
|
||||
CornerstoneToolsMouseClick(event, instance, data) {
|
||||
const toolState = cornerstoneTools.getToolState(instance.element, 'bidirectional');
|
||||
|
||||
// Stop here if no tool state was found
|
||||
if (!toolState) {
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
for (let i = 0; i < toolState.data.length; i++) {
|
||||
const toolData = toolState.data[i];
|
||||
if (toolData.active) {
|
||||
OHIF.measurements.toggleLabelButton({
|
||||
instance,
|
||||
toolData,
|
||||
position: data.currentPoints.page
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user