LT-290 Disable Lesion Tracker tool buttons if the opened study is not associated
- Fix the bug with temp lesion when the study is not associated
This commit is contained in:
1 parent
7fa242d0aa
commit
5cbf08ea4f
5 files changed
+54
-9
No files matched your search
@@ -41,3 +41,21 @@ OHIF.lesiontracker.toggleLesionTrackerTools = () => {
|
||||
toolsShown = true;
|
||||
}
|
||||
};
|
||||
|
||||
OHIF.lesiontracker.toggleLesionTrackerToolsButtons = (isEnabled) => {
|
||||
const toolStates = previousStates || toolManager.getToolDefaultStates();
|
||||
|
||||
if (isEnabled) {
|
||||
toolStates.disabledToolButtons = [];
|
||||
} else {
|
||||
toolStates.disabledToolButtons = [ 'bidirectional', 'nonTarget', 'crTool', 'unTool', 'exTool', 'toggleHUD', 'toggleTrial', 'toolbarSectionEntry' ];
|
||||
}
|
||||
|
||||
// Reload the updated previous or default states
|
||||
toolManager.setToolDefaultStates(toolStates);
|
||||
|
||||
// Reset the active tool if disabled
|
||||
if (!isEnabled) {
|
||||
toolManager.setActiveTool();
|
||||
}
|
||||
};
|
||||
@@ -53,12 +53,14 @@ class MeasurementHandlers {
|
||||
const timepointApi = instance.data.timepointApi;
|
||||
if (timepointApi) {
|
||||
const timepoint = timepointApi.study(studyInstanceUid)[0];
|
||||
const timepointId = timepoint.timepointId;
|
||||
measurement.timepointId = timepointId;
|
||||
measurement.measurementNumber = OHIF.measurements.MeasurementManager.getNewMeasurementNumber(timepointId, Collection, timepointApi);
|
||||
if (timepoint) {
|
||||
const timepointId = timepoint.timepointId;
|
||||
measurement.timepointId = timepointId;
|
||||
measurement.measurementNumber = OHIF.measurements.MeasurementManager.getNewMeasurementNumber(timepointId, Collection, timepointApi);
|
||||
|
||||
// TODO: Fix this
|
||||
measurement.measurementNumberAbsolute = measurement.measurementNumber;
|
||||
// TODO: Fix this
|
||||
measurement.measurementNumberAbsolute = measurement.measurementNumber;
|
||||
}
|
||||
} else {
|
||||
const numCurrentMeasurementsInStudy = Collection.find({
|
||||
studyInstanceUid: study.studyInstanceUid
|
||||
|
||||
Reference in new issue
Block a user