From 0c07400cc36017bcf749cd6d37bd9a88ebe80b8f Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 10 Jun 2025 11:36:28 +0100 Subject: [PATCH] update viewer for atlas series --- atlas/templates/atlas/case_display_block.html | 11 - .../atlas/series_finding_details.html | 3 - atlas/templates/atlas/series_viewer.html | 140 +- atlas/views.py | 16 +- ...e-484ovEoR.wasm => charlswasm_decode.wasm} | Bin .../assets/{index-BNYRLLy7.css => index.css} | 0 .../dv3d/assets/{jpeg-BQEpTZHd.js => jpeg.js} | 0 ...muVl.wasm => libjpegturbowasm_decode.wasm} | Bin .../{lossless-BIYWXcdg.js => lossless.js} | 0 ...C4nnCcr6.wasm => openjpegwasm_decode.wasm} | Bin ...openjphjs-C-BUUy4a.wasm => openjphjs.wasm} | Bin rad/static/dv3d/index-DBrYmXwn.js | 3938 ----------------- rad/static/dv3d/index.js | 3860 ++++++++++++++++ templates/base.html | 2 +- 14 files changed, 3896 insertions(+), 4074 deletions(-) rename rad/static/dv3d/assets/{charlswasm_decode-484ovEoR.wasm => charlswasm_decode.wasm} (100%) rename rad/static/dv3d/assets/{index-BNYRLLy7.css => index.css} (100%) rename rad/static/dv3d/assets/{jpeg-BQEpTZHd.js => jpeg.js} (100%) rename rad/static/dv3d/assets/{libjpegturbowasm_decode-daqMmuVl.wasm => libjpegturbowasm_decode.wasm} (100%) rename rad/static/dv3d/assets/{lossless-BIYWXcdg.js => lossless.js} (100%) rename rad/static/dv3d/assets/{openjpegwasm_decode-C4nnCcr6.wasm => openjpegwasm_decode.wasm} (100%) rename rad/static/dv3d/assets/{openjphjs-C-BUUy4a.wasm => openjphjs.wasm} (100%) delete mode 100644 rad/static/dv3d/index-DBrYmXwn.js create mode 100644 rad/static/dv3d/index.js diff --git a/atlas/templates/atlas/case_display_block.html b/atlas/templates/atlas/case_display_block.html index 3dee8871..92555369 100755 --- a/atlas/templates/atlas/case_display_block.html +++ b/atlas/templates/atlas/case_display_block.html @@ -413,14 +413,6 @@ .then(response => response.text()) .then(html => { modalBody.innerHTML = html; // Load the fetched HTML into the modal body - const viewer_element = document.getElementById('single-dicom-viewer'); - const images = JSON.parse(viewer_element.getAttribute('data-images')); - window.loadDicomViewer(images); - annotationjson = JSON.parse(viewer_element.dataset.annotationjson); - viewport = JSON.parse(viewer_element.dataset.viewportjson); - current_image_id_index = viewer_element.dataset.currentimageid; - console.log(viewer_element.dataset.annotationjson3d) - console.log(viewer_element.dataset.viewerstate3d) load_3d = false; viewer_element_3d = document.getElementById('root'); if (viewer_element_3d.dataset.viewerstate3d != undefined) { @@ -430,11 +422,9 @@ } else { viewer_element_3d = null; } - dicom_element = $(".cornerstone-element").get(0); // We have a slight delay to allow the viewer to load setTimeout(function () { // Then we load the annotation and viewport - loadAnnotationAndViewportOnElement(annotationjson, viewport, dicom_element, current_image_id_index); window.mountDicomViewers(); if (load_3d) { console.log("loading 3d") @@ -450,7 +440,6 @@ }, 200); document.getElementById("reload-finding").addEventListener("click", function () { - loadAnnotationAndViewportOnElement(annotationjson, viewport, dicom_element, current_image_id_index); importAnnotations_root(annotationjson3d) importViewerState_root(viewerState); }); diff --git a/atlas/templates/atlas/series_finding_details.html b/atlas/templates/atlas/series_finding_details.html index 6a10b3cb..e9bcd2a8 100644 --- a/atlas/templates/atlas/series_finding_details.html +++ b/atlas/templates/atlas/series_finding_details.html @@ -20,9 +20,6 @@ {% with image_url_array_and_count=finding.series.get_image_url_array_and_count %} -
-
-
+{% comment %}
+
{% endcomment %}
Add finding - + {% endif %}
@@ -91,12 +91,7 @@ Associated case: {% for finding in series.findings.all %}
- - - {% if finding.viewer_state_3d %} - - {% endif %} + Finding(s): {% for f in finding.findings.all %}{{f.get_link}}{% endfor %}
@@ -135,6 +130,10 @@ Associated case:

This will limit the series to the selected bounds (the rest of the images will be deleted). This is useful when you have a large volume of which only a small area is relevant to the case. NOTE: once deleted the images cannot be recovered on the site (they would have to be reuploaded if required). Make sure your images are shown in the correct order above and use test the test truncate button first.

+ + Start
End
@@ -225,44 +224,22 @@ Associated case: - + {% block js %} {% endblock %}