.
This commit is contained in:
+15
-15
@@ -607,19 +607,19 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadCornerstoneThumb(image) {
|
function loadCornerstoneThumb(image) {
|
||||||
img = $("<div></div>").get(0);
|
img = $("<div></div>").get(0);
|
||||||
img.id = "thumb-image-" + id;
|
img.id = "thumb-image-" + id;
|
||||||
img.class = "thumbnail";
|
img.class = "thumbnail";
|
||||||
img.title =
|
img.title =
|
||||||
"Click on the thumbnail to view and manipulate the image.";
|
"Click on the thumbnail to view and manipulate the image.";
|
||||||
img.draggable = "false";
|
img.draggable = "false";
|
||||||
img.style = "height: 100px; width: 100px";
|
img.style = "height: 100px; width: 100px";
|
||||||
$("#thumb-" + id).append(img);
|
$("#thumb-" + id).append(img);
|
||||||
|
|
||||||
const element = document.getElementById("thumb-image-" + id);
|
const element = document.getElementById("thumb-image-" + id);
|
||||||
cornerstone.enable(element);
|
cornerstone.enable(element);
|
||||||
cornerstone.displayImage(element, image);
|
cornerstone.displayImage(element, image);
|
||||||
cornerstone.resize(element);
|
cornerstone.resize(element);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (images.length > 1 && load_as_stack == false) {
|
if (images.length > 1 && load_as_stack == false) {
|
||||||
@@ -667,14 +667,14 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l
|
|||||||
dfile
|
dfile
|
||||||
);
|
);
|
||||||
cornerstone.loadAndCacheImage(imageId).then(function (image) {
|
cornerstone.loadAndCacheImage(imageId).then(function (image) {
|
||||||
loadCornerstoneThumb();
|
loadCornerstoneThumb(image);
|
||||||
}); //.catch( function(error) {
|
}); //.catch( function(error) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (image_url.startsWith("wadouri")) {
|
if (image_url.startsWith("wadouri")) {
|
||||||
cornerstone.loadAndCacheImage(image_url).then(function (image) {
|
cornerstone.loadAndCacheImage(image_url).then(function (image) {
|
||||||
loadCornerstoneThumb();
|
loadCornerstoneThumb(image);
|
||||||
});
|
});
|
||||||
} else if ((!image_url.endsWith("dicom") && !image_url.endsWith("dcm")) || image_url.startsWith("base64")) {
|
} else if ((!image_url.endsWith("dicom") && !image_url.endsWith("dcm")) || image_url.startsWith("base64")) {
|
||||||
img = $("<img />", {
|
img = $("<img />", {
|
||||||
@@ -693,7 +693,7 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l
|
|||||||
|
|
||||||
let url = "wadouri:" + image_url;
|
let url = "wadouri:" + image_url;
|
||||||
cornerstone.loadAndCacheImage(url).then(function (image) {
|
cornerstone.loadAndCacheImage(url).then(function (image) {
|
||||||
loadCornerstoneThumb();
|
loadCornerstoneThumb(image);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user