Fixed bug LT-85 (Location Response Selections). Work on LT-9 and LT-12
This commit is contained in:
1 parent
28cee350ff
commit
220ff065dc
44 files changed
+1515
-824
No files matched your search
@@ -0,0 +1,34 @@
|
||||
clearMeasurementTimepointData = function(measurementId, timepointId) {
|
||||
var data = Measurements.findOne(measurementId);
|
||||
|
||||
// Check that this Measurement actually contains data for this timepoint
|
||||
if (!data || !data.timepoints[timepointId]) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Clear the Measurement data for this timepoint
|
||||
var imageId = data.timepoints[timepointId].imageId;
|
||||
var toolType = data.isTarget ? 'lesion' : 'nonTarget';
|
||||
removeToolDataWithMeasurementId(imageId, toolType, measurementId);
|
||||
|
||||
// Update any viewports that are currently displaying this imageId
|
||||
var enabledElements = cornerstone.getEnabledElementsByImageId(imageId);
|
||||
enabledElements.forEach(function(enabledElement) {
|
||||
cornerstone.updateImage(enabledElement.element);
|
||||
});
|
||||
|
||||
delete data.timepoints[timepointId];
|
||||
|
||||
if (Object.keys(data.timepoints).length === 0) {
|
||||
Meteor.call("removeMeasurement", measurementId, function(error, response) {
|
||||
console.log('Removed!');
|
||||
});
|
||||
} else {
|
||||
// Update the Timepoint object of the Measurement document
|
||||
Measurements.update(measurementId, {
|
||||
$set: {
|
||||
timepoints: data.timepoints
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user