LT-28: Scale overlay tool (work-in-progress)
This commit is contained in:
1 parent
75269e43f1
commit
d87f436ada
6 files changed
+352
-3
No files matched your search
@@ -9,6 +9,10 @@ Meteor.startup(function() {
|
||||
touch: cornerstoneTools.nonTargetTouch
|
||||
});
|
||||
|
||||
toolManager.addTool('scaleOverlayTool', {
|
||||
mouse: cornerstoneTools.scaleOverlayTool
|
||||
});
|
||||
|
||||
toolManager.addTool('deleteLesionKeyboardTool', {
|
||||
mouse: cornerstoneTools.deleteLesionKeyboardTool,
|
||||
touch: cornerstoneTools.deleteLesionKeyboardTool
|
||||
|
||||
@@ -16,6 +16,8 @@ Template.viewer.onCreated(function() {
|
||||
OHIF.viewer.defaultTool = 'wwwc';
|
||||
OHIF.viewer.refLinesEnabled = true;
|
||||
OHIF.viewer.isPlaying = {};
|
||||
var contentId = this.data.contentId;
|
||||
|
||||
|
||||
OHIF.viewer.functionList = {
|
||||
invert: function(element) {
|
||||
@@ -44,6 +46,22 @@ Template.viewer.onCreated(function() {
|
||||
},
|
||||
nonTarget: function() {
|
||||
toolManager.setActiveTool("nonTarget");
|
||||
},
|
||||
scaleOverlayTool: function() {
|
||||
|
||||
// scaleOverlayToolShown property checks visibility of scale overlay tool between tabs
|
||||
if(ViewerData[contentId].scaleOverlayToolShown === true) {
|
||||
$('.imageViewerViewport').each(function(index, element) {
|
||||
cornerstoneTools.scaleOverlayTool.disable(element);
|
||||
});
|
||||
ViewerData[contentId].scaleOverlayToolShown = false;
|
||||
|
||||
}else{
|
||||
$('.imageViewerViewport').each(function(index, element) {
|
||||
cornerstoneTools.scaleOverlayTool.enable(element);
|
||||
});
|
||||
ViewerData[contentId].scaleOverlayToolShown = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -62,7 +80,6 @@ Template.viewer.onCreated(function() {
|
||||
};
|
||||
}
|
||||
|
||||
var contentId = this.data.contentId;
|
||||
|
||||
if (ViewerData[contentId].loadedSeriesData) {
|
||||
log.info('Reloading previous loadedSeriesData');
|
||||
|
||||
@@ -39,6 +39,20 @@ Template.viewerMain.helpers({
|
||||
iconClasses: 'fa fa-bars'
|
||||
});
|
||||
|
||||
buttonData.push({
|
||||
id: 'scaleOverlayTool',
|
||||
title: 'Scale Overlay',
|
||||
classes: 'imageViewerCommand',
|
||||
iconClasses: 'fa fa-arrows-h'
|
||||
});
|
||||
|
||||
buttonData.push({
|
||||
id: 'length',
|
||||
title: 'Length Measurement',
|
||||
classes: 'imageViewerTool',
|
||||
iconClasses: 'fa fa-arrows-v'
|
||||
});
|
||||
|
||||
buttonData.push({
|
||||
id: 'lesion',
|
||||
title: 'Target Tool',
|
||||
|
||||
Reference in new issue
Block a user