.
This commit is contained in:
@@ -43,4 +43,40 @@ function loadDicomViewer(images_to_load, annotations_to_load) {
|
||||
dicomViewer.loadCornerstone($(single_dicom), null, images, annotations, load_as_stack);
|
||||
}
|
||||
}
|
||||
let single_dicom2 = document.getElementById("dicom-viewer2");
|
||||
if (single_dicom2) {
|
||||
|
||||
let images = single_dicom2.dataset.images;
|
||||
|
||||
if (images_to_load != undefined) {
|
||||
images = images_to_load;
|
||||
} else {
|
||||
images = JSON.parse(images);
|
||||
}
|
||||
|
||||
console.log(images);
|
||||
|
||||
let annotations = single_dicom2.dataset.annotations;
|
||||
if (annotations_to_load != undefined) {
|
||||
annotations = annotations_to_load;
|
||||
} else if (annotations && annotations.indexOf(",") > 0) {
|
||||
console.log("annon2", annotations)
|
||||
annotations = JSON.parse(annotations);
|
||||
} else {
|
||||
annotations = undefined;
|
||||
}
|
||||
|
||||
console.log("annon1", annotations)
|
||||
|
||||
let load_as_stack;
|
||||
if (images.length > 5) {
|
||||
load_as_stack = true;
|
||||
} else {
|
||||
load_as_stack = false;
|
||||
}
|
||||
|
||||
if (images) {
|
||||
dicomViewer.loadCornerstone($(single_dicom2), null, images, annotations, load_as_stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user