.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user