LT-348: Viewport is recorded when target / non-target tools are modified

This commit is contained in:
Erik Ziegler committed 2016-11-19 17:40:17 +01:00
1 parent 47e52e46a3
commit 47e149b648
2 files changed
+6 -1

No files matched your search

@@ -96,7 +96,6 @@ import { OHIF } from 'meteor/ohif:core';
},
longestDiameter: 0,
shortestDiameter: 0,
isDeleted: false,
toolType: 'bidirectional'
};
@@ -121,6 +121,12 @@ class MeasurementHandlers {
const measurementId = measurement._id;
delete measurement._id;
// If the measurement configuration includes a value for Viewport,
// we will populate this with the Cornerstone Viewport
if (measurementToolConfiguration.schema.schema('viewport')) {
measurement.viewport = cornerstone.getViewport(eventData.element);
}
// Clean the measurement according to the Schema
measurementToolConfiguration.schema.clean(measurement);