Compare commits
10
Commits
ab150b4929
...
8afde176f3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8afde176f3 | ||
|
|
0fcbf61432 | ||
|
|
210f5dc70f | ||
|
|
4cc8d0a014 | ||
|
|
da4e47b8b6 | ||
|
|
67591e92e6 | ||
|
|
db46c153f0 | ||
|
|
f2241ea9d0 | ||
|
|
8a90041201 | ||
|
|
857bf11d26 |
+1
-1
@@ -44,7 +44,7 @@
|
|||||||
color: lightblue;
|
color: lightblue;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-dicom-viewer {
|
.cornerstone-element {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
+417
-164
File diff suppressed because it is too large
Load Diff
+5
-4
@@ -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='["{\"ArrowAnnotate\":{\"data\":[{\"visible\":true,\"active\":false,\"handles\":{\"start\":{\"x\":450.01249999999993,\"y\":592.8031510416666,\"highlight\":true,\"active\":false},\"end\":{\"x\":283.38750000000005,\"y\":343.976484375,\"highlight\":true,\"active\":false,\"moving\":false},\"textBox\":{\"active\":false,\"hasMoved\":false,\"movesIndependently\":false,\"drawnIndependently\":true,\"allowedOutsideImage\":true,\"hasBoundingBox\":true}},\"uuid\":\"51ca68b0-734c-4046-b3da-dd2886496fd5\",\"invalidated\":true}]}}", 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='["{\"ArrowAnnotate\":{\"data\":[{\"visible\":true,\"active\":false,\"handles\":{\"start\":{\"x\":450.01249999999993,\"y\":592.8031510416666,\"highlight\":true,\"active\":false},\"end\":{\"x\":283.38750000000005,\"y\":343.976484375,\"highlight\":true,\"active\":false,\"moving\":false},\"textBox\":{\"active\":false,\"hasMoved\":false,\"movesIndependently\":false,\"drawnIndependently\":true,\"allowedOutsideImage\":true,\"hasBoundingBox\":true}},\"uuid\":\"51ca68b0-734c-4046-b3da-dd2886496fd5\",\"invalidated\":true}]}}", 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>
|
||||||
|
|||||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+2058
-1195
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
+2
-2
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
Vendored
+2
-16
File diff suppressed because one or more lines are too long
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 87 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 130 KiB |
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user