diff --git a/atlas/templates/atlas/case_display_block.html b/atlas/templates/atlas/case_display_block.html index 1f92c72c..3dee8871 100755 --- a/atlas/templates/atlas/case_display_block.html +++ b/atlas/templates/atlas/case_display_block.html @@ -419,15 +419,40 @@ 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) { + load_3d = true; + viewerState = JSON.parse(viewer_element_3d.dataset.viewerstate3d || {}); + annotationjson3d = JSON.parse(viewer_element_3d.dataset.annotationjson3d || {}); + } 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") + + //setTimeout(function () { + // console.log("loading 3d annotation") + // importAnnotations_root(annotationjson3d) + // importViewerState_root(viewerState); + //}, 1000); + } else { + console.log("not loading 3d") + } }, 200); document.getElementById("reload-finding").addEventListener("click", function () { loadAnnotationAndViewportOnElement(annotationjson, viewport, dicom_element, current_image_id_index); + importAnnotations_root(annotationjson3d) + importViewerState_root(viewerState); }); // Initialize the DICOM viewer with the images and annotations diff --git a/atlas/templates/atlas/series_finding_details.html b/atlas/templates/atlas/series_finding_details.html index 7ac1fe91..6a10b3cb 100644 --- a/atlas/templates/atlas/series_finding_details.html +++ b/atlas/templates/atlas/series_finding_details.html @@ -23,5 +23,9 @@
$?(P.sortIndex=V,e(l,P),r(c)===null&&P===r(l)&&(p?(x(_),_=-1):p=!0,G(w,V-$))):(P.sortIndex=j,e(c,P),g||h||(g=!0,A(C))),P},t.unstable_shouldYield=b,t.unstable_wrapCallback=function(P){var N=d;return function(){var V=d;d=N;try{return P.apply(this,arguments)}finally{d=V}}}})(v6);m6.exports=v6;var yF=m6.exports;/**
+ */(function(t){function e(P,N){var V=P.length;P.push(N);e:for(;0 $?(P.sortIndex=V,e(l,P),r(c)===null&&P===r(l)&&(p?(x(_),_=-1):p=!0,G(w,V-$))):(P.sortIndex=H,e(c,P),g||h||(g=!0,A(C))),P},t.unstable_shouldYield=b,t.unstable_wrapCallback=function(P){var N=d;return function(){var V=d;d=N;try{return P.apply(this,arguments)}finally{d=V}}}})(S6);C6.exports=S6;var _F=C6.exports;/**
* @license React
* react-dom.production.min.js
*
@@ -30,24 +30,24 @@ var qV=Object.defineProperty;var XV=(t,e,r)=>e in t?qV(t,e,{enumerable:!0,config
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var xF=Qe,Ui=yF;function Ne(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r=0)&&(f=f[0],d=!0),f==null)u=e[o]!==f;else{if(n&&f.length!==n)if(f.length=0)&&(f=f[0],d=!0),f==null)u=e[o]!==f;else{if(n&&f.length!==n)if(f.length