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

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

View File

@ -96,7 +96,6 @@ import { OHIF } from 'meteor/ohif:core';
},
longestDiameter: 0,
shortestDiameter: 0,
isDeleted: false,
toolType: 'bidirectional'
};

View File

@ -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);