LT-32: Set lesion tool as active tool if timepoint is baseline otherwise window level when switch the tabs

This commit is contained in:
Aysel Afsar committed 2016-02-24 12:45:37 -05:00
1 parent 192e3c5988
commit f26fc22cef
4 files changed
+26 -6

No files matched your search

@@ -0,0 +1,10 @@
// If timepoint is baseline, sets lesion tool as active tool
// Else sets default tool
setTimepointActiveTool = function(timepoint) {
if ((timepoint.timepointType).toLowerCase() === "baseline") {
// Set active tool as lesion tool
toolManager.setActiveTool('lesion');
} else {
toolManager.setActiveTool(toolManager.getDefaultTool());
}
};
@@ -14,6 +14,8 @@ function dblClickOnStudy(data) {
studyInstanceUid: data.studyInstanceUid
});
console.log(study);
// Check if the study has been associated, and if not, just open it on its own
if (!study) {
// Open a new tab with this study
@@ -28,17 +30,14 @@ function dblClickOnStudy(data) {
}
});
// Check timepointType whether or not baseline
if ((timepoint.timepointType).toLowerCase() === "baseline") {
// Set active tool as lesion tool
toolManager.setActiveTool('lesion');
}
if (!timepoint) {
openNewTab(data.studyInstanceUid, title);
return;
}
// Set active tool for timepoint
setTimepointActiveTool(timepoint);
// Add the Timepoint name to the Patient name to create the tab title
title += ' ' + getTimepointName(timepoint);
+4
View File
@@ -160,6 +160,8 @@ Package.onUse(function(api) {
api.addFiles('lib/clearTools.js', 'client');
api.addFiles('lib/calculateTotalLesionBurden.js', 'client');
api.addFiles('lib/convertToNonTarget.js', 'client');
api.addFiles('lib/setTimepointActiveTool.js', 'client');
api.addFiles('lib/syncMeasurementAndToolData.js', 'client');
api.addFiles('lib/syncImageMeasurementAndToolData.js', 'client');
@@ -194,6 +196,8 @@ Package.onUse(function(api) {
api.export('calculateTotalLesionBurden', 'client');
api.export('convertToNonTarget', 'client');
api.export('exportStudies', 'client');
api.export('setTimepointActiveTool', 'client');
// Export global objects
api.export('TrialResponseCriteria', 'client');