feat: Automate tracking prompts for a less disruptive annotation workflow (#4822)
Co-authored-by: Devu Jayalekshmi <devu.jayalekshmi@trenser.com>
This commit is contained in:
1 parent
c0391cea1b
commit
54fded554e
42 files changed
+948
-70
No files matched your search
@@ -1,4 +1,6 @@
|
||||
import React from 'react';
|
||||
import { setAnnotationLabel } from '@cornerstonejs/tools/utilities';
|
||||
import { annotation } from '@cornerstonejs/tools';
|
||||
import { LabellingFlow } from '@ohif/ui';
|
||||
import { InputDialog } from '@ohif/ui-next';
|
||||
|
||||
@@ -89,6 +91,7 @@ export async function callInputDialogAutoComplete({
|
||||
uiDialogService,
|
||||
labelConfig,
|
||||
renderContent = LabellingFlow,
|
||||
element,
|
||||
}) {
|
||||
const exclusive = labelConfig ? labelConfig.exclusive : false;
|
||||
const dropDownItems = labelConfig ? labelConfig.items : [];
|
||||
@@ -97,7 +100,8 @@ export async function callInputDialogAutoComplete({
|
||||
const labellingDoneCallback = newValue => {
|
||||
uiDialogService.hide('select-annotation');
|
||||
if (measurement && typeof newValue === 'string') {
|
||||
measurement.label = newValue;
|
||||
const sourceAnnotation = annotation.state.getAnnotation(measurement.uid);
|
||||
setAnnotationLabel(sourceAnnotation, element, newValue);
|
||||
}
|
||||
resolve(newValue);
|
||||
};
|
||||
|
||||
@@ -18,6 +18,7 @@ async function promptSaveReport({ servicesManager, commandsManager, extensionMan
|
||||
const isBackupSave = evt.isBackupSave === undefined ? evt.data.isBackupSave : evt.isBackupSave;
|
||||
const StudyInstanceUID = evt?.data?.StudyInstanceUID || ctx.trackedStudy;
|
||||
const SeriesInstanceUID = evt?.data?.SeriesInstanceUID;
|
||||
const { displaySetInstanceUID } = evt.data ?? evt;
|
||||
|
||||
const {
|
||||
trackedSeries,
|
||||
@@ -76,6 +77,7 @@ async function promptSaveReport({ servicesManager, commandsManager, extensionMan
|
||||
SeriesInstanceUID,
|
||||
viewportId,
|
||||
isBackupSave,
|
||||
displaySetInstanceUID,
|
||||
};
|
||||
} catch (error) {
|
||||
console.warn('Unable to save report', error);
|
||||
|
||||
Reference in new issue
Block a user