LT-115: Fixing Non-Target and Ellipse data issues
This commit is contained in:
parent
94c0e1b25d
commit
97f48bd27c
@ -18,8 +18,8 @@ Template.dialogNonTargetMeasurement.onCreated(() => {
|
|||||||
// Remove the measurement from the collection
|
// Remove the measurement from the collection
|
||||||
instance.removeMeasurement = () => {
|
instance.removeMeasurement = () => {
|
||||||
const measurementApi = instance.viewerData.measurementApi;
|
const measurementApi = instance.viewerData.measurementApi;
|
||||||
measurementApi.deleteMeasurements(instance.measurementTypeId, {
|
measurementApi.deleteMeasurements('nonTargets', {
|
||||||
_id: instance.data.measurementData._id
|
toolItemId: instance.data.measurementData._id
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update the Overall Measurement Numbers for all Measurements
|
// Update the Overall Measurement Numbers for all Measurements
|
||||||
|
|||||||
@ -9,7 +9,7 @@ class MeasurementHandlers {
|
|||||||
const measurementApi = instance.data.measurementApi;
|
const measurementApi = instance.data.measurementApi;
|
||||||
const Collection = measurementApi.tools[eventData.toolType];
|
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) {
|
if (!Collection) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -77,6 +77,11 @@ class MeasurementHandlers {
|
|||||||
const measurementApi = instance.data.measurementApi;
|
const measurementApi = instance.data.measurementApi;
|
||||||
const Collection = measurementApi.tools[eventData.toolType];
|
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');
|
OHIF.log.info('CornerstoneToolsMeasurementModified');
|
||||||
|
|
||||||
let measurement = Collection.findOne(measurementData._id);
|
let measurement = Collection.findOne(measurementData._id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user