This commit is contained in:
Ross
2021-11-11 22:01:15 +00:00
parent fe72b77f89
commit 1f7226dc10
+3 -2
View File
@@ -478,14 +478,15 @@
let imageId; let imageId;
if (el.files[0].type.startsWith("image")) { if (el.files[0].type.startsWith("image")) {
imageId = `${url}`;
base = await blobToBase64(el.files[0]); base = await blobToBase64(el.files[0]);
imageId = "base64://" + base.split(",")[1]; imageId = "base64://" + base.split(",")[1];
imageId2 = base;
} else { } else {
imageId = `wadouri:${url}`; imageId = `wadouri:${url}`;
imageId2 = imageId
} }
console.log(imageId) console.log(imageId)
const element = $(`<div class='temp-thumb' src=${imageId}></div>`).get(0) const element = $(`<div class='temp-thumb' src=${imageId2}></div>`).get(0)
$(el).parent().parent().prepend(element); $(el).parent().parent().prepend(element);
cornerstone.enable(element); cornerstone.enable(element);
cornerstone.loadAndCacheImage(imageId).then(function (image) { cornerstone.loadAndCacheImage(imageId).then(function (image) {