From 3f6c68523e3b37e7c4dcc55cc037639a5f105d05 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 2 Jun 2025 10:30:21 +0100 Subject: [PATCH] . --- dicom-viewer/src/App.tsx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) 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) {