Updates for Timepoint assocation (LT-60) and Conformance Checks (LT-92, LT-93, LT-94)

This commit is contained in:
Erik Ziegler committed 2016-02-08 19:59:39 +01:00
1 parent 6c4eae3699
commit beaa56c0b3
144 files changed
+5050 -2416

No files matched your search

+72 -56
View File
@@ -7,40 +7,55 @@ Meteor.startup(function() {
}
OHIF.viewer.defaultHotkeys = {
defaultTool: "ESC",
angle: "A",
stackScroll: "S",
pan: "P",
magnify: "M",
scrollDown: ["DOWN", "PAGEDOWN"],
scrollUp: ["UP", "PAGEUP"],
nextPanel: "RIGHT",
previousPanel: "LEFT",
invert: "I",
flipV: "V",
flipH: "H",
wwwc: "W",
zoom: "Z",
cinePlay: "SPACE",
rotateR: "R",
rotateL: "L",
defaultTool: 'ESC',
angle: 'A',
stackScroll: 'S',
pan: 'P',
magnify: 'M',
scrollDown: ['DOWN', 'PAGEDOWN'],
scrollUp: ['UP', 'PAGEUP'],
nextPanel: 'RIGHT',
previousPanel: 'LEFT',
invert: 'I',
flipV: 'V',
flipH: 'H',
wwwc: 'W',
zoom: 'Z',
cinePlay: 'SPACE',
rotateR: 'R',
rotateL: 'L',
toggleOverlayTags: 'SHIFT',
WLPresetSoftTissue: ["NUMPAD1", "1"],
WLPresetLung: ["NUMPAD2", "2"],
WLPresetLiver: ["NUMPAD3", "3"],
WLPresetBone: ["NUMPAD4", "4"],
WLPresetBrain: ["NUMPAD5", "5"]
WLPresetSoftTissue: ['NUMPAD1', '1'],
WLPresetLung: ['NUMPAD2', '2'],
WLPresetLiver: ['NUMPAD3', '3'],
WLPresetBone: ['NUMPAD4', '4'],
WLPresetBrain: ['NUMPAD5', '5']
};
// For now
OHIF.viewer.hotkeys = OHIF.viewer.defaultHotkeys;
OHIF.viewer.defaultWLPresets = {
'SoftTissue' : {wc : 40, ww : 400},
'Lung' : {wc : -600, ww : 1500},
'Liver' : {wc : 90, ww : 150},
'Bone' : {wc: 480, ww : 2500},
'Brain' : {wc : 40, ww : 80}
SoftTissue: {
wc: 40,
ww: 400
},
Lung: {
wc: -600,
ww: 1500
},
Liver: {
wc: 90,
ww: 150
},
Bone: {
wc: 480,
ww: 2500
},
Brain: {
wc: 40,
ww: 80
}
};
// For now
@@ -48,53 +63,53 @@ Meteor.startup(function() {
OHIF.viewer.hotkeyFunctions = {
wwwc: function() {
toolManager.setActiveTool("wwwc");
toolManager.setActiveTool('wwwc');
},
zoom: function() {
toolManager.setActiveTool("zoom");
toolManager.setActiveTool('zoom');
},
angle: function() {
toolManager.setActiveTool("angle");
toolManager.setActiveTool('angle');
},
dragProbe: function() {
toolManager.setActiveTool("dragProbe");
toolManager.setActiveTool('dragProbe');
},
ellipticalRoi: function() {
toolManager.setActiveTool("ellipticalRoi");
toolManager.setActiveTool('ellipticalRoi');
},
magnify: function() {
toolManager.setActiveTool("magnify");
toolManager.setActiveTool('magnify');
},
annotate: function() {
toolManager.setActiveTool("annotate");
toolManager.setActiveTool('annotate');
},
stackScroll: function() {
toolManager.setActiveTool("stackScroll");
toolManager.setActiveTool('stackScroll');
},
pan: function() {
toolManager.setActiveTool("pan");
toolManager.setActiveTool('pan');
},
length: function() {
toolManager.setActiveTool("length");
toolManager.setActiveTool('length');
},
spine: function() {
toolManager.setActiveTool("spine");
toolManager.setActiveTool('spine');
},
wwwcRegion: function() {
toolManager.setActiveTool("wwwcRegion");
toolManager.setActiveTool('wwwcRegion');
},
zoomIn: function () {
var button = document.getElementById("zoomIn");
zoomIn: function() {
var button = document.getElementById('zoomIn');
flashButton(button);
zoomIn();
},
zoomOut: function () {
var button = document.getElementById("zoomOut");
zoomOut: function() {
var button = document.getElementById('zoomOut');
flashButton(button);
zoomOut();
},
zoomToFit: function () {
var button = document.getElementById("zoomToFit");
zoomToFit: function() {
var button = document.getElementById('zoomToFit');
flashButton(button);
zoomToFit();
},
@@ -134,27 +149,27 @@ Meteor.startup(function() {
previousActivePanel();
},
invert: function() {
var button = document.getElementById("invert");
var button = document.getElementById('invert');
flashButton(button);
invert();
},
flipV: function() {
var button = document.getElementById("flipV");
var button = document.getElementById('flipV');
flashButton(button);
flipV();
},
flipH: function() {
var button = document.getElementById("flipH");
var button = document.getElementById('flipH');
flashButton(button);
flipH();
},
rotateR: function() {
var button = document.getElementById("rotateR");
var button = document.getElementById('rotateR');
flashButton(button);
rotateR();
},
rotateL: function() {
var button = document.getElementById("rotateL");
var button = document.getElementById('rotateL');
flashButton(button);
rotateL();
},
@@ -174,6 +189,8 @@ Meteor.startup(function() {
}
}
};
OHIF.viewer.loadedSeriesData = {};
});
// Define a jQuery reverse function
@@ -198,7 +215,6 @@ function previousActivePanel() {
setActiveViewport(element);
}
function nextActivePanel() {
log.info('nextActivePanel');
var currentIndex = Session.get('activeViewport');
@@ -224,7 +240,7 @@ function flashButton(button) {
}
button.classList.add('active');
setTimeout(function () {
setTimeout(function() {
button.classList.remove('active');
}, 100);
}
@@ -233,13 +249,13 @@ function bindHotkey(hotkey, task) {
var hotkeyFunctions = OHIF.viewer.hotkeyFunctions;
// Only bind defined, non-empty HotKeys
if (!hotkey || hotkey === "") {
if (!hotkey || hotkey === '') {
return;
}
var fn;
if (task.indexOf("WLPreset") > -1) {
var presetName = task.replace("WLPreset", "");
if (task.indexOf('WLPreset') > -1) {
var presetName = task.replace('WLPreset', '');
fn = function() {
applyWLPresetToActiveElement(presetName);
};
@@ -282,4 +298,4 @@ enableHotkeys = function() {
bindHotkey(taskHotkeys, task);
}
});
};
};
+12 -4
View File
@@ -29,8 +29,14 @@ getWADORSImageId = function(instance) {
//maxPixelValue : 255,
slope: instance.rescaleSlope,
intercept: instance.rescaleIntercept,
windowCenter : windowCenter,
windowWidth : windowWidth,
samplesPerPixel: instance.samplesPerPixel,
imageOrientationPatient: instance.imageOrientationPatient,
imagePositionPatient: instance.imagePositionPatient,
sopClassUid: instance.sopClassUid,
instanceNumber: instance.instanceNumber,
frameOfReferenceUID: instance.frameOfReferenceUID,
windowCenter: windowCenter,
windowWidth: windowWidth,
//render: cornerstone.renderColorImage,
//getPixelData: getPixelData,
//getImageData: getImageData,
@@ -47,6 +53,8 @@ getWADORSImageId = function(instance) {
instance: instance
};
var imageId = cornerstoneWADORSImageLoader.addImage(image);
var imageId = cornerstoneWADOImageLoader.imageManager.add(image);
console.log('WADO-RS ImageID: ' + imageId);
return imageId;
};
};
+11 -6
View File
@@ -1,9 +1,14 @@
/**
* Formats a patient name for display purposes
*/
formatPN = function(context) {
if (!context) {
return;
}
return context.replace('^', ', ');
};
/**
* A global Blaze UI helper to format a patient name for display purposes
*/
UI.registerHelper('formatPN', function (context) {
if (!context) {
return undefined;
}
return context.replace('^', ', ');
});
UI.registerHelper('formatPN', formatPN);
+1 -1
View File
@@ -7,4 +7,4 @@ UI.registerHelper("inlineIf", function (value, match, attributeName) {
return attributeName;
}
return '';
});
});
@@ -0,0 +1,20 @@
/**
* Helper function to determine if the current client devices
* is touch-capable. This can be used to modify certain aspects of the UI.
*
* The check may not work on all devices!
*
* @returns {boolean} true if the client device is touch-capable, false otherwise
*/
isTouchDevice = function() {
return (('ontouchstart' in window) ||
(navigator.MaxTouchPoints > 0) ||
(navigator.msMaxTouchPoints > 0));
};
/**
* Blaze helper for checking if the current device is touch capable
*
* @returns {boolean} true if the client device is touch-capable, false otherwise
*/
UI.registerHelper('isTouchDevice', isTouchDevice);
-13
View File
@@ -1,13 +0,0 @@
/**
* Helper function to determine if the current client devices
* is touch-capable. This can be used to modify certain aspects of the UI.
*
* The check may not work on all devices!
*
* @returns {boolean} true if the client device is touch-capable, false otherwise
*/
isTouchDevice = function() {
return (('ontouchstart' in window) ||
(navigator.MaxTouchPoints > 0) ||
(navigator.msMaxTouchPoints > 0));
};
@@ -46,6 +46,7 @@ addMetaData = function(imageId, data) {
instanceNumber: instanceMetaData.instanceNumber,
laterality: instanceMetaData.laterality,
viewPosition: instanceMetaData.viewPosition,
sliceThickness: instanceMetaData.sliceThickness,
index: imageIndex
};
@@ -1 +0,0 @@