This commit is contained in:
Ross
2021-08-20 09:21:23 +01:00
parent 5cf069f19c
commit 9e8d730d87
5 changed files with 31 additions and 12 deletions
+9 -5
View File
@@ -162,7 +162,7 @@ window.addEventListener('loadDicomViewerUrls', function (e) {
loadDicomViewer(e.detail);
}, false);
function loadDicomViewer(images_to_load) {
function loadDicomViewer(images_to_load, annotations_to_load) {
console.log("loadDicomViewer", images_to_load);
let single_dicom = document.getElementById("single-dicom-viewer");
if (single_dicom) {
@@ -171,17 +171,21 @@ function loadDicomViewer(images_to_load) {
if (images_to_load != undefined) {
images = images_to_load;
console.log("i1", images)
} else if (images.indexOf(",") > 0) {
images = images.split(",");
images = JSON.parse(images);
}
console.log(images);
let annotations = single_dicom.dataset.annotations;
if (annotations != undefined && annotations.indexOf(",") > 0) {
annotations = annotations;
if (annotations != undefined) {
annotations = annotations_to_load;
} else if (annotations && annotations.indexOf(",") > 0) {
annotations = JSON.parse(annotations);
} else {
annotations = undefined;
}
let load_as_stack;
if (images.length > 5) {
load_as_stack = true;