Lesion Tracker Redesign so far

This commit is contained in:
Erik Ziegler committed 2016-07-22 11:00:16 +02:00
1 parent b247e89d8b
commit a9a4f3f82b
109 files changed
+2972 -936

No files matched your search

@@ -18,7 +18,7 @@ toggleLesionTrackerTools = function() {
activate: [ 'deleteLesionKeyboardTool' ],
deactivate: [],
enable: [],
disable: [ 'bidirectional', 'nonTarget', 'scaleOverlayTool', 'length', 'crTool', 'unTool', 'exTool' ]
disable: [ 'bidirectional', 'nonTarget', 'length', 'crTool', 'unTool', 'exTool' ]
};
toolManager.setToolDefaultStates(toolDefaultStates);
@@ -6,12 +6,7 @@
* @param title The title to be used for the tab heading
*/
openNewTabWithTimepoint = function(timepointId, title) {
log.info('openNewTabWithTimepoint: ' + timepointId + ' ' + title);
// Generate a unique ID to represent this tab
// We can't just use the Mongo entry ID because
// then it will change after hot-reloading.
var contentid = uuid.new();
var contentid = 'viewerTab';
var timepoint = Timepoints.findOne({
timepointId: timepointId
@@ -27,13 +22,7 @@ openNewTabWithTimepoint = function(timepointId, title) {
throw 'No studies found that are related to this timepoint';
}
// Create a new entry in the WorklistTabs Collection
WorklistTabs.insert({
title: title,
contentid: contentid,
active: false,
timepointId: timepointId
});
ViewerData = window.ViewerData || ViewerData;
// Update the ViewerData global object
ViewerData[contentid] = {
@@ -17,7 +17,7 @@ function dblClickOnStudy(data) {
// 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
openNewTab(data.studyInstanceUid, title);
open(data.studyInstanceUid, title);
return;
}
@@ -29,7 +29,7 @@ function dblClickOnStudy(data) {
});
if (!timepoint) {
openNewTab(data.studyInstanceUid, title);
open(data.studyInstanceUid, title);
return;
}
@@ -37,4 +37,36 @@ function dblClickOnStudy(data) {
title += ' ' + getTimepointName(timepoint);
openNewTabWithTimepoint(timepoint.timepointId, title);
}
}
/**
* Opens a study
*
* @param studyInstanceUid The UID of the Study to be opened
* @param title The title to be used for the tab heading
*/
function open(studyInstanceUid, title) {
var contentid = 'viewerTab';
WorklistTabs.remove({});
// Create a new entry in the WorklistTabs Collection
WorklistTabs.insert({
title: title,
contentid: contentid,
studyInstanceUid: studyInstanceUid,
active: false
});
ViewerData = window.ViewerData || ViewerData;
// Update the ViewerData global object
ViewerData[contentid] = {
title: title,
contentid: contentid,
studyInstanceUids: [studyInstanceUid]
};
// Switch to the new tab
switchToTab(contentid);
}