LT-115: Remove CRUNEX tools
This commit is contained in:
parent
b51628cc9f
commit
7c915bd891
@ -80,7 +80,7 @@
|
|||||||
if (keyCode === keys.DELETE ||
|
if (keyCode === keys.DELETE ||
|
||||||
(keyCode === keys.D && eventData.event.ctrlKey === true)) {
|
(keyCode === keys.D && eventData.event.ctrlKey === true)) {
|
||||||
|
|
||||||
var toolTypes = [ 'lesion', 'nonTarget', 'length'];
|
var toolTypes = [ 'bidirectional', 'nonTarget', 'length', 'crTool', 'unTool', 'exTool'];
|
||||||
var nearbyToolData = getNearbyToolData(eventData.element, eventData.currentPoints.canvas, toolTypes);
|
var nearbyToolData = getNearbyToolData(eventData.element, eventData.currentPoints.canvas, toolTypes);
|
||||||
|
|
||||||
if (!nearbyToolData) {
|
if (!nearbyToolData) {
|
||||||
|
|||||||
@ -28,10 +28,6 @@ Template.lesionTableTimepointCell.helpers({
|
|||||||
return data.response;
|
return data.response;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isTarget: function() {
|
|
||||||
var lesionData = Template.parentData(1);
|
|
||||||
return lesionData.isTarget;
|
|
||||||
},
|
|
||||||
|
|
||||||
isBidirectional: function() {
|
isBidirectional: function() {
|
||||||
var lesionData = Template.parentData(1);
|
var lesionData = Template.parentData(1);
|
||||||
|
|||||||
@ -25,7 +25,7 @@ activateLesion = function(measurementId, templateData) {
|
|||||||
sort: {
|
sort: {
|
||||||
latestDate: 1
|
latestDate: 1
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
// Loop through each timepoint and populate the orderTimepointEntries array with
|
// Loop through each timepoint and populate the orderTimepointEntries array with
|
||||||
// The measurement data at each timepoint. The most recent measurements will be first in
|
// The measurement data at each timepoint. The most recent measurements will be first in
|
||||||
@ -58,9 +58,11 @@ activateLesion = function(measurementId, templateData) {
|
|||||||
// Stop if we run out of timepoints before viewports
|
// Stop if we run out of timepoints before viewports
|
||||||
if (viewportIndex >= orderedTimepointEntries.length) {
|
if (viewportIndex >= orderedTimepointEntries.length) {
|
||||||
// Update the element anyway, to remove any other highlights that are present
|
// Update the element anyway, to remove any other highlights that are present
|
||||||
deactivateAllToolData(element, 'lesion');
|
deactivateAllToolData(element, 'bidirectional');
|
||||||
deactivateAllToolData(element, 'nonTarget');
|
deactivateAllToolData(element, 'nonTarget');
|
||||||
cornerstone.updateImage(element);
|
deactivateAllToolData(element, 'crTool');
|
||||||
|
deactivateAllToolData(element, 'unTool');
|
||||||
|
deactivateAllToolData(element, 'exTool');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -79,8 +81,11 @@ activateLesion = function(measurementId, templateData) {
|
|||||||
// If there is no measurement data to display, stop here
|
// If there is no measurement data to display, stop here
|
||||||
if (!measurementAtTimepoint) {
|
if (!measurementAtTimepoint) {
|
||||||
// Update the element anyway, to remove any other highlights that are present
|
// Update the element anyway, to remove any other highlights that are present
|
||||||
deactivateAllToolData(element, 'lesion');
|
deactivateAllToolData(element, 'bidirectional');
|
||||||
deactivateAllToolData(element, 'nonTarget');
|
deactivateAllToolData(element, 'nonTarget');
|
||||||
|
deactivateAllToolData(element, 'crTool');
|
||||||
|
deactivateAllToolData(element, 'unTool');
|
||||||
|
deactivateAllToolData(element, 'exTool');
|
||||||
cornerstone.updateImage(element);
|
cornerstone.updateImage(element);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,7 +57,7 @@ activateMeasurements = function(element, measurementId, templateData, viewportIn
|
|||||||
* @param timepointId
|
* @param timepointId
|
||||||
*/
|
*/
|
||||||
function activateTool(element, measurementData, timepointId) {
|
function activateTool(element, measurementData, timepointId) {
|
||||||
deactivateAllToolData(element, 'lesion');
|
deactivateAllToolData(element, 'bidirectional');
|
||||||
deactivateAllToolData(element, 'nonTarget');
|
deactivateAllToolData(element, 'nonTarget');
|
||||||
|
|
||||||
// Deactivate CRUNEX Tools
|
// Deactivate CRUNEX Tools
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
clearTools = function() {
|
clearTools = function() {
|
||||||
var patientId = Session.get('patientId');
|
var patientId = Session.get('patientId');
|
||||||
var toolTypes = [ 'lesion', 'nonTarget', 'length', 'ellipticalRoi'];
|
var toolTypes = [ 'bidirectional', 'nonTarget', 'length', 'ellipticalRoi', 'crTool', 'unTool', 'exTool' ];
|
||||||
var toolState = cornerstoneTools.globalImageIdSpecificToolStateManager.toolState;
|
var toolState = cornerstoneTools.globalImageIdSpecificToolStateManager.toolState;
|
||||||
var toolStateKeys = Object.keys(toolState).slice(0);
|
var toolStateKeys = Object.keys(toolState).slice(0);
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,10 @@ handleMeasurementRemoved = function(e, eventData) {
|
|||||||
|
|
||||||
switch (eventData.toolType) {
|
switch (eventData.toolType) {
|
||||||
case 'nonTarget':
|
case 'nonTarget':
|
||||||
case 'lesion':
|
case 'bidirectional':
|
||||||
|
case 'crTool':
|
||||||
|
case 'unTool':
|
||||||
|
case 'exTool':
|
||||||
log.info('CornerstoneToolsMeasurementRemoved');
|
log.info('CornerstoneToolsMeasurementRemoved');
|
||||||
|
|
||||||
var measurement = Measurements.findOne(measurementData.id, {
|
var measurement = Measurements.findOne(measurementData.id, {
|
||||||
|
|||||||
@ -18,7 +18,7 @@ toggleLesionTrackerTools = function() {
|
|||||||
activate: [ 'deleteLesionKeyboardTool' ],
|
activate: [ 'deleteLesionKeyboardTool' ],
|
||||||
deactivate: [],
|
deactivate: [],
|
||||||
enable: [],
|
enable: [],
|
||||||
disable: [ 'lesion', 'nonTarget', 'scaleOverlayTool', 'length' ]
|
disable: [ 'bidirectional', 'nonTarget', 'scaleOverlayTool', 'length', 'crTool', 'unTool', 'exTool' ]
|
||||||
};
|
};
|
||||||
|
|
||||||
toolManager.setToolDefaultStates(toolDefaultStates);
|
toolManager.setToolDefaultStates(toolDefaultStates);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user