diff --git a/atlas/templates/atlas/new_uploads.html b/atlas/templates/atlas/new_uploads.html
index a5bb971a..270ddcd0 100644
--- a/atlas/templates/atlas/new_uploads.html
+++ b/atlas/templates/atlas/new_uploads.html
@@ -17,6 +17,14 @@
Only valid dicom files will be uploaded.
It is possible to upload multiple files by selecting the parent (containing) folder. Folders within will then be searched recursively for any valid dicom files.
Files to be uploaded will be displayed below.
+ DICOM tags will be checked to see if valid accession or hospital numbers are present but no annonymisation will be performed.
+ By default a basic OCR will also be performed to check for burned in details on images, the is resource intensive and can be disabled if you know the content you are uploading does not feature any patient details.
+
+
+ Settings
+ Check for annonymisation (OCR)
+ Show thumbnails
+ Show viewer
@@ -251,6 +259,7 @@
}
}
async function loadDicomViewerTest(callback) {
+ $("#single-dicom-viewer").hide();
console.log("load")
$("#single-dicom-viewer").empty()
//images = []
@@ -328,25 +337,39 @@
let url = URL.createObjectURL(file)
console.log(url)
imageId = `wadouri:${url}`;
- images.push(imageId);
+ if ($("#show-viewer").is(":checked")) {
+ images.push(imageId);
+ }
window.to_upload.push(file);
- const element = $(`
`).get(0)
- item.appendChild(element);
- cornerstone.enable(element);
- cornerstone.loadAndCacheImage(imageId).then(function (image) {
- cornerstone.displayImage(element, image);
+ if (!$("#check-annonymisation-ocr").is(":checked") && !$("#show-thumbnails").is(":checked")) {
- $(element).addClass("temp-thumb-large");
- cornerstone.resize(element)
- setTimeout(function () {
- ocr($(element).find("canvas").get(0).toDataURL(), element);
- $(element).removeClass("temp-thumb-large");
- cornerstone.resize(element)
- }, 500);
+ } else {
+ const element = $(`
`).get(0)
+ item.appendChild(element);
+ cornerstone.enable(element);
+ cornerstone.loadAndCacheImage(imageId).then(function (image) {
+ cornerstone.displayImage(element, image);
+
+ if ($("#check-annonymisation-ocr").is(":checked")) {
+ $(element).addClass("temp-thumb-large");
+ cornerstone.resize(element)
+ setTimeout(function () {
+ ocr($(element).find("canvas").get(0).toDataURL(), element);
+ $(element).removeClass("temp-thumb-large");
+ cornerstone.resize(element)
- });
+ if (!$("#show-thumbnails").is(":checked")) {
+ cornerstone.disable(element);
+ element.remove();
+ }
+ }, 500);
+ }
+
+
+ });
+ }
}
}
@@ -358,7 +381,10 @@
});
$("#loading").hide()
- window.dispatchEvent(event);
+ if ($("#show-viewer").is(":checked")) {
+ window.dispatchEvent(event);
+ $("#single-dicom-viewer").show();
+ }
@@ -379,32 +405,32 @@
uploading_el.removeClass("image-ident-loading");
console.log("found text", l);
if (l.includes("accession") || l.includes("number") || l.search(
- /(ref|rk9|rh8|ra9|rbz)\d+/g) > -1) {
- console.log("Match found ", input);
- $(input).addClass("image-ident-warning");
- uploading_el.addClass("image-ident-warning");
- $("uploadButton").prop("disabled", true);
- toastr.warning(`File does not appear to be annonymised Image data burned in ${element}`, 'Anonymisation warning', {
- "closeButton": false,
- "debug": false,
- "newestOnTop": false,
- "progressBar": false,
- "positionClass": "toast-top-full-width",
- "preventDuplicates": false,
- "onclick": null,
- "showDuration": "0",
- "hideDuration": "0",
- "timeOut": 0,
- "extendedTimeOut": 0,
- "showEasing": "swing",
- "hideEasing": "linear",
- "showMethod": "fadeIn",
- "hideMethod": "fadeOut",
- });
- } else {
- $(input).addClass("image-ident-ok");
+ /(ref|rk9|rh8|ra9|rbz)\d+/g) > -1) {
+ console.log("Match found ", input);
+ $(input).addClass("image-ident-warning");
+ uploading_el.addClass("image-ident-warning");
+ $("uploadButton").prop("disabled", true);
+ toastr.warning(`File does not appear to be annonymised Image data burned in ${element}`, 'Anonymisation warning', {
+ "closeButton": false,
+ "debug": false,
+ "newestOnTop": false,
+ "progressBar": false,
+ "positionClass": "toast-top-full-width",
+ "preventDuplicates": false,
+ "onclick": null,
+ "showDuration": "0",
+ "hideDuration": "0",
+ "timeOut": 0,
+ "extendedTimeOut": 0,
+ "showEasing": "swing",
+ "hideEasing": "linear",
+ "showMethod": "fadeIn",
+ "hideMethod": "fadeOut",
+ });
+ } else {
+ $(input).addClass("image-ident-ok");
- }
+ }
})
}
diff --git a/templates/base.html b/templates/base.html
index 4356c0d7..61ee31ea 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -54,7 +54,8 @@
-
+ {% comment %} {% endcomment %}
+