LT-350: remove measurements from the viewport
This commit is contained in:
1 parent
9a11dc1808
commit
98e8cf4eca
9 files changed
+165
-78
No files matched your search
+31
-8
@@ -70,17 +70,40 @@ Template.measurementTableTimepointCell.events({
|
||||
const rowItem = instance.data.rowItem;
|
||||
const timepoints = instance.data.timepoints.get();
|
||||
OHIF.measurements.jumpToRowItem(rowItem, timepoints);
|
||||
}/*,
|
||||
},
|
||||
|
||||
'keydown .measurementTableTimepointCell'(event, instance) {
|
||||
const keyCode = event.which;
|
||||
if (keyCode === keys.DELETE ||
|
||||
(keyCode === keys.D && e.ctrlKey === true)) {
|
||||
const currentMeasurement = Template.parentData(1).rowItem;
|
||||
const currentTimepointID = this.timepointId;
|
||||
|
||||
showConfirmDialog(function() {
|
||||
OHIF.lesiontracker.clearMeasurementTimepointData(currentMeasurement._id, currentTimepointID);
|
||||
if (keyCode === keys.DELETE || keyCode === keys.BACKSPACE || (keyCode === keys.D && event.ctrlKey === true)) {
|
||||
const currentMeasurement = Template.parentData(1).rowItem;
|
||||
const timepointId = this.timepointId;
|
||||
|
||||
const dialogSettings = {
|
||||
title: 'Delete measurements',
|
||||
message: 'Are you sure you want to delete this measurement?'
|
||||
};
|
||||
|
||||
OHIF.ui.showFormDialog('dialogConfirm', dialogSettings).then(() => {
|
||||
const measurementTypeId = instance.data.rowItem.measurementTypeId;
|
||||
const measurement = instance.data.rowItem.entries[0];
|
||||
const measurementNumber = measurement.measurementNumber;
|
||||
const measurementApi = instance.data.measurementApi;
|
||||
const timepointApi = instance.data.timepointApi;
|
||||
|
||||
// Remove all the measurements with the given type and number
|
||||
measurementApi.deleteMeasurements(measurementTypeId, {
|
||||
measurementNumber,
|
||||
timepointId
|
||||
});
|
||||
|
||||
// Sync the new measurement data with cornerstone tools
|
||||
const baseline = timepointApi.baseline();
|
||||
measurementApi.sortMeasurements(baseline.timepointId);
|
||||
|
||||
// Repaint the images on all viewports without the removed measurements
|
||||
_.each($('.imageViewerViewport'), element => cornerstone.updateImage(element));
|
||||
});
|
||||
}
|
||||
}*/
|
||||
}
|
||||
});
|
||||
-1
@@ -4,7 +4,6 @@
|
||||
theme('border-left', '%s solid $uiBorderColor' % $uiBorderThickness)
|
||||
theme('color', '$textPrimaryColor')
|
||||
padding: 0 10px
|
||||
outline: none
|
||||
cursor: pointer
|
||||
|
||||
&:hover
|
||||
|
||||
Reference in new issue
Block a user