LT-115: Activate CR/UN/EX tools data when lesion table is clicked

This commit is contained in:
Aysel Afsar 2016-03-02 23:38:03 -05:00
parent a4521c0fa7
commit a41e50d79f
3 changed files with 10 additions and 1 deletions

View File

@ -161,6 +161,7 @@
response: toolName, response: toolName,
isTarget: true, isTarget: true,
measurementType: 'nonTarget', measurementType: 'nonTarget',
toolType: toolType,
toolName: 'Target' toolName: 'Target'
}; };

View File

@ -83,6 +83,9 @@ function updateLesionData(lesionData) {
id: lesionData.id, id: lesionData.id,
measurementType: lesionData.measurementType measurementType: lesionData.measurementType
}; };
if (lesionData.toolType) {
measurement.toolType = lesionData.toolType;
}
// Retrieve the location name given the locationUID // Retrieve the location name given the locationUID
if (lesionData.locationUID !== undefined) { if (lesionData.locationUID !== undefined) {

View File

@ -60,7 +60,12 @@ function activateTool(element, measurementData, timepointId) {
deactivateAllToolData(element, 'lesion'); deactivateAllToolData(element, 'lesion');
deactivateAllToolData(element, 'nonTarget'); deactivateAllToolData(element, 'nonTarget');
var toolType = measurementData.isTarget ? 'lesion' : 'nonTarget'; // Deactivate CRUNEX Tools
deactivateAllToolData(element, 'crTool');
deactivateAllToolData(element, 'unTool');
deactivateAllToolData(element, 'exTool');
var toolType = measurementData.toolType ? measurementData.toolType:(measurementData.isTarget ? 'lesion' : 'nonTarget');
var toolData = cornerstoneTools.getToolState(element, toolType); var toolData = cornerstoneTools.getToolState(element, toolType);
if (!toolData) { if (!toolData) {
return; return;