.
This commit is contained in:
@@ -178,7 +178,7 @@ function loadDicomViewer(images_to_load, annotations_to_load) {
|
||||
console.log(images);
|
||||
|
||||
let annotations = single_dicom.dataset.annotations;
|
||||
if (annotations != undefined) {
|
||||
if (annotations_to_load != undefined) {
|
||||
annotations = annotations_to_load;
|
||||
} else if (annotations && annotations.indexOf(",") > 0) {
|
||||
annotations = JSON.parse(annotations);
|
||||
|
||||
@@ -11,6 +11,7 @@ cornerstoneWADOImageLoader.external.cornerstone = cornerstone;
|
||||
|
||||
cornerstoneTools.init();
|
||||
|
||||
let tool_state = {};
|
||||
|
||||
|
||||
export function loadCornerstone(main_element, db, images, annotations_to_load, load_as_stack = false) {
|
||||
@@ -180,15 +181,14 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l
|
||||
|
||||
|
||||
function loadAnnotation(imageId, annotation) {
|
||||
console.log("loadAnnotations", imageId, annotations);
|
||||
console.log("loadAnnotations", imageId, annotation);
|
||||
const toolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager;
|
||||
|
||||
if (annotation == undefined || annotation.length < 1 || annotation == [undefined]) { return }
|
||||
|
||||
console.log(annotation);
|
||||
console.log("1234", annotation);
|
||||
let tool_state_no_id = JSON.parse(annotation);
|
||||
|
||||
let tool_state = {};
|
||||
tool_state[imageId] = tool_state_no_id;
|
||||
|
||||
toolStateManager.restoreToolState(tool_state);
|
||||
|
||||
Reference in New Issue
Block a user