This commit is contained in:
Ross
2021-11-11 22:51:45 +00:00
parent c3ea181fde
commit 8f374cd78d
+4 -4
View File
@@ -606,7 +606,7 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l
});
}
function loadCornerstoneThumb(image) {
function loadCornerstoneThumb(image, id) {
let img = $("<div></div>").get(0);
img.id = "thumb-image-" + id;
img.class = "thumbnail";
@@ -667,14 +667,14 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l
dfile
);
cornerstone.loadAndCacheImage(imageId).then(function (image) {
loadCornerstoneThumb(image);
loadCornerstoneThumb(image, id);
}); //.catch( function(error) {
});
}
} else {
if (image_url.startsWith("wadouri")) {
cornerstone.loadAndCacheImage(image_url).then(function (image) {
loadCornerstoneThumb(image);
loadCornerstoneThumb(image, id);
});
} else if ((!image_url.endsWith("dicom") && !image_url.endsWith("dcm")) || image_url.startsWith("base64")) {
img = $("<img />", {
@@ -693,7 +693,7 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l
let url = "wadouri:" + image_url;
cornerstone.loadAndCacheImage(url).then(function (image) {
loadCornerstoneThumb(image);
loadCornerstoneThumb(image, id);
});
}
}