Added persistent single-image measurments (length, ellipse) (LT-37, LT-156)

This commit is contained in:
Erik Ziegler committed 2016-02-14 13:36:44 +01:00
1 parent b624d12762
commit 36ff46be41
20 files changed
+227 -34

No files matched your search

@@ -3136,6 +3136,8 @@ if (typeof cornerstoneTools === 'undefined') {
if (!isNaN(meanStdDev.mean) && !isNaN(meanStdDev.stdDev)) {
data.meanStdDev = meanStdDev;
data.mean = meanStdDev.mean;
data.stdev = meanStdDev.stdev;
}
}
@@ -3985,6 +3987,9 @@ if (typeof cornerstoneTools === 'undefined') {
// Calculate the length, and create the text variable with the millimeters or pixels suffix
var length = Math.sqrt(dx * dx + dy * dy);
// Store the length inside the tool for outside access
data.length = length;
// Set the length text suffix depending on whether or not pixelSpacing is available
var suffix = ' mm';
if (!eventData.image.rowPixelSpacing || !eventData.image.columnPixelSpacing) {
@@ -6646,7 +6651,7 @@ if (typeof cornerstoneTools === 'undefined') {
// If any handle is outside the image, delete the tool data
if (options.deleteIfHandleOutsideImage === true &&
cornerstoneTools.anyHandlesOutsideImage(eventData, data.handles)) {
cornerstoneTools.toolState.removeToolState(element, toolType, data);
cornerstoneTools.removeToolState(element, toolType, data);
}
cornerstone.updateImage(element);