Compare commits

..
10 Commits
Author SHA1 Message Date
Ross 8afde176f3 . 2022-04-26 20:40:52 +01:00
Ross 0fcbf61432 . 2022-04-08 17:44:19 +01:00
Ross 210f5dc70f fixes, upgrade cornerstone 2022-03-22 22:21:59 +00:00
Ross 4cc8d0a014 update cornerstone tools 2021-12-07 10:53:18 +00:00
Ross da4e47b8b6 update cornerstone 2021-12-05 20:12:16 +00:00
Ross 67591e92e6 navigate annotations 2021-12-04 16:06:55 +00:00
Ross db46c153f0 start allowing multiple viewer on single page 2021-12-04 14:57:42 +00:00
Ross f2241ea9d0 remove a log of log statements 2021-12-03 18:04:07 +00:00
Ross 8a90041201 improve thumbnail loading 2021-11-20 09:43:05 +00:00
Ross 857bf11d26 . 2021-11-05 18:17:36 +00:00
16 changed files with 2536 additions and 9467 deletions
+1 -1
View File
@@ -44,7 +44,7 @@
color: lightblue; color: lightblue;
} }
.single-dicom-viewer { .cornerstone-element {
position: relative; position: relative;
height: 100%; height: 100%;
} }
+417 -164
View File
File diff suppressed because it is too large Load Diff
+5 -4
View File
@@ -11,9 +11,9 @@
<script src="lib/cornerstone/cornerstone.min.js"></script> <script src="lib/cornerstone/cornerstone.min.js"></script>
<script src="lib/cornerstone/dicomParser.min.js"></script> <script src="lib/cornerstone/dicomParser.min.js"></script>
<script src="lib/cornerstone/cornerstoneMath.min.js"></script> <script src="lib/cornerstone/cornerstoneMath.min.js"></script>
<script src="lib/cornerstone/cornerstoneTools.min.js"></script> <script src="lib/cornerstone/cornerstoneTools.js"></script>
<script src="lib/cornerstone/cornerstoneWebImageLoader.min.js"></script> <script src="lib/cornerstone/cornerstoneWebImageLoader.min.js"></script>
<script src="lib/cornerstone/cornerstoneWADOImageLoader.js"></script> <script src="lib/cornerstone/cornerstoneWADOImageLoader.min.js"></script>
<script src="lib/cornerstone/cornerstone-base64-image-loader.umd.js"></script> <script src="lib/cornerstone/cornerstone-base64-image-loader.umd.js"></script>
<script src="loader.js" defer="defer" type="module"></script> <script src="loader.js" defer="defer" type="module"></script>
@@ -25,8 +25,9 @@
<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 id="dicom-viewer" class="dicom-viewer" style="height: 600px;" data-images='["test_images/CXR.dcm"]' data-annotations=''></div></div> <!-- <div id="dicom-viewer2" 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 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>
+2 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -16
View File
File diff suppressed because one or more lines are too long
+36
View File
@@ -43,4 +43,40 @@ function loadDicomViewer(images_to_load, annotations_to_load) {
dicomViewer.loadCornerstone($(single_dicom), null, images, annotations, load_as_stack); dicomViewer.loadCornerstone($(single_dicom), null, images, annotations, load_as_stack);
} }
} }
let single_dicom2 = document.getElementById("dicom-viewer2");
if (single_dicom2) {
let images = single_dicom2.dataset.images;
if (images_to_load != undefined) {
images = images_to_load;
} else {
images = JSON.parse(images);
}
console.log(images);
let annotations = single_dicom2.dataset.annotations;
if (annotations_to_load != undefined) {
annotations = annotations_to_load;
} else if (annotations && annotations.indexOf(",") > 0) {
console.log("annon2", annotations)
annotations = JSON.parse(annotations);
} else {
annotations = undefined;
}
console.log("annon1", annotations)
let load_as_stack;
if (images.length > 5) {
load_as_stack = true;
} else {
load_as_stack = false;
}
if (images) {
dicomViewer.loadCornerstone($(single_dicom2), null, images, annotations, load_as_stack);
}
}
} }
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.