From 4b3b1fcf675329547727914c70518111344c340a Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 16 Nov 2021 12:16:50 +0000 Subject: [PATCH] . --- rapids/templates/rapids/rapid_form.html | 11 +++++++++++ templates/base.html | 2 ++ 2 files changed, 13 insertions(+) diff --git a/rapids/templates/rapids/rapid_form.html b/rapids/templates/rapids/rapid_form.html index f24acc99..eb3df78f 100755 --- a/rapids/templates/rapids/rapid_form.html +++ b/rapids/templates/rapids/rapid_form.html @@ -434,6 +434,10 @@ //let extra_class = ""; let imageId; if (el.files[0].type.startsWith("image")) { + + let hash = CryptoJS.MD5(el.files[0]).toString(); + console.log("HASH", hash) + base = await blobToBase64(el.files[0]); imageId = "base64://" + base.split(",")[1]; imageId2 = base; @@ -458,6 +462,13 @@ cornerstone.displayImage(element, image); cornerstone.resize(element) + + let pixel_data = cornerstone.getEnabledElement(element).image.getPixelData() + console.log("pixel data", pixel_data) + + let hash = CryptoJS.MD5(pixel_data).toString(); + console.log("HASH", hash) + }); $("#drop-filenames").append( diff --git a/templates/base.html b/templates/base.html index dc0a9e00..3fb6f3c3 100644 --- a/templates/base.html +++ b/templates/base.html @@ -16,6 +16,8 @@ + +