diff --git a/dicom-viewer/src/App.tsx b/dicom-viewer/src/App.tsx index dd4f388..c618389 100644 --- a/dicom-viewer/src/App.tsx +++ b/dicom-viewer/src/App.tsx @@ -1240,17 +1240,10 @@ function App() { } // Add each annotation from the imported data if (Array.isArray(annotationData)) { + // For now just add them to a new group + //const group = new cornerstoneTools.annotation.AnnotationGroup(); annotationData.forEach(ann => { - cornerstoneTools.annotation.state.addAnnotation(ann); - }); - } else if (annotationData && typeof annotationData === "object") { - // If the data is an object with tool types as keys - Object.values(annotationData).forEach((anns: any) => { - if (Array.isArray(anns)) { - anns.forEach(ann => { - cornerstoneTools.annotation.state.addAnnotation(ann); - }); - } + cornerstoneTools.annotation.state.addAnnotation(ann, ann.annotationUID); }); } if (renderingEngineRef.current) {