LT-115: Fixing Non-Target and Ellipse data issues

This commit is contained in:
Bruno Alves de Faria committed 2017-01-04 18:31:06 -02:00
1 parent 94c0e1b25d
commit 97f48bd27c
2 files changed
+8 -3

No files matched your search

@@ -18,8 +18,8 @@ Template.dialogNonTargetMeasurement.onCreated(() => {
// Remove the measurement from the collection
instance.removeMeasurement = () => {
const measurementApi = instance.viewerData.measurementApi;
measurementApi.deleteMeasurements(instance.measurementTypeId, {
_id: instance.data.measurementData._id
measurementApi.deleteMeasurements('nonTargets', {
toolItemId: instance.data.measurementData._id
});
// Update the Overall Measurement Numbers for all Measurements
@@ -9,7 +9,7 @@ class MeasurementHandlers {
const measurementApi = instance.data.measurementApi;
const Collection = measurementApi.tools[eventData.toolType];
// Stop here if collection was not found for the given tool
// Stop here if the tool data shall not be stored (e.g. temp tools)
if (!Collection) {
return;
}
@@ -77,6 +77,11 @@ class MeasurementHandlers {
const measurementApi = instance.data.measurementApi;
const Collection = measurementApi.tools[eventData.toolType];
// Stop here if the tool data shall not be stored (e.g. temp tools)
if (!Collection) {
return;
}
OHIF.log.info('CornerstoneToolsMeasurementModified');
let measurement = Collection.findOne(measurementData._id);