This commit is contained in:
Ross
2021-11-05 18:17:36 +00:00
parent ab150b4929
commit 857bf11d26
6 changed files with 10 additions and 4 deletions
+8 -2
View File
@@ -705,7 +705,7 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l
} }
function loadCornerstoneMainImage(element, image, stack, db, load_as_stack) { function loadCornerstoneMainImage(element, image, stack, db, load_as_stack) {
dumpDataSet(image.data) //dumpDataSet(image.data)
console.log("loadCornerstoneMainImage") console.log("loadCornerstoneMainImage")
console.log("load as stack:", load_as_stack) console.log("load as stack:", load_as_stack)
// It is probably silly to do this each time we load a question // It is probably silly to do this each time we load a question
@@ -904,7 +904,13 @@ async function loadAltDicomInterface(db) {
function onImageRendered(e) { function onImageRendered(e) {
const eventData = e.detail; const eventData = e.detail;
//console.log(e); //console.log(e);
dumpDataSet(eventData.image.data) try {
// todo improve
dumpDataSet(eventData.image.data);
} catch {
console.log("unable to extract dicom data")
}
// Update ww/wl // Update ww/wl
$("#wc").text(Math.round(eventData.viewport.voi.windowCenter)); $("#wc").text(Math.round(eventData.viewport.voi.windowCenter));
+2 -2
View File
@@ -25,8 +25,8 @@
<h1>A dicom viewer</h1> <h1>A dicom viewer</h1>
<!-- <div id="dicom-viewer" class="dicom-viewer" style="height: 600px;" data-images='["test_images/IMG1.dcm","test_images/IMG1.dcm"]' data-annotations='[&quot;{\&quot;ArrowAnnotate\&quot;:{\&quot;data\&quot;:[{\&quot;visible\&quot;:true,\&quot;active\&quot;:false,\&quot;handles\&quot;:{\&quot;start\&quot;:{\&quot;x\&quot;:450.01249999999993,\&quot;y\&quot;:592.8031510416666,\&quot;highlight\&quot;:true,\&quot;active\&quot;:false},\&quot;end\&quot;:{\&quot;x\&quot;:283.38750000000005,\&quot;y\&quot;:343.976484375,\&quot;highlight\&quot;:true,\&quot;active\&quot;:false,\&quot;moving\&quot;:false},\&quot;textBox\&quot;:{\&quot;active\&quot;:false,\&quot;hasMoved\&quot;:false,\&quot;movesIndependently\&quot;:false,\&quot;drawnIndependently\&quot;:true,\&quot;allowedOutsideImage\&quot;:true,\&quot;hasBoundingBox\&quot;:true}},\&quot;uuid\&quot;:\&quot;51ca68b0-734c-4046-b3da-dd2886496fd5\&quot;,\&quot;invalidated\&quot;:true}]}}&quot;, null]'></div></div> --> <!-- <div id="dicom-viewer" class="dicom-viewer" style="height: 600px;" data-images='["test_images/IMG1.dcm","test_images/IMG1.dcm"]' data-annotations='[&quot;{\&quot;ArrowAnnotate\&quot;:{\&quot;data\&quot;:[{\&quot;visible\&quot;:true,\&quot;active\&quot;:false,\&quot;handles\&quot;:{\&quot;start\&quot;:{\&quot;x\&quot;:450.01249999999993,\&quot;y\&quot;:592.8031510416666,\&quot;highlight\&quot;:true,\&quot;active\&quot;:false},\&quot;end\&quot;:{\&quot;x\&quot;:283.38750000000005,\&quot;y\&quot;:343.976484375,\&quot;highlight\&quot;:true,\&quot;active\&quot;:false,\&quot;moving\&quot;:false},\&quot;textBox\&quot;:{\&quot;active\&quot;:false,\&quot;hasMoved\&quot;:false,\&quot;movesIndependently\&quot;:false,\&quot;drawnIndependently\&quot;:true,\&quot;allowedOutsideImage\&quot;:true,\&quot;hasBoundingBox\&quot;:true}},\&quot;uuid\&quot;:\&quot;51ca68b0-734c-4046-b3da-dd2886496fd5\&quot;,\&quot;invalidated\&quot;:true}]}}&quot;, null]'></div></div> -->
<!-- <div id="dicom-viewer" class="dicom-viewer" style="height: 600px;" data-images='["test_images/IMG1.dcm", "test_images/IMG2.dcm"]' data-annotations=''></div></div> --> <div id="dicom-viewer" class="dicom-viewer" style="height: 600px;" data-images='["test_images/IMG1.dcm", "test_images/IMG2.dcm", "test_images/IMG3.dcm", "test_images/IMG4.dcm", "test_images/IMG5.dcm", "test_images/IMG6.dcm"]' data-annotations=''></div></div>
<div id="dicom-viewer" class="dicom-viewer" style="height: 600px;" data-images='["test_images/CXR.dcm"]' data-annotations=''></div></div> <!-- <div id="dicom-viewer" class="dicom-viewer" style="height: 600px;" data-images='["test_images/CXR.dcm"]' data-annotations=''></div></div> -->
</main> </main>
<footer></footer> <footer></footer>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.
Binary file not shown.