This commit is contained in:
Ross
2025-06-02 10:30:21 +01:00
parent 38620d969b
commit 3f6c68523e
+3 -10
View File
@@ -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) {