add the ability to load by imageid
This commit is contained in:
@@ -1220,6 +1220,12 @@ export function loadStackIndex(new_index, dicom_element) {
|
||||
//c = cornerstone.getEnabledElement(dicom_element)
|
||||
}
|
||||
|
||||
export function loadImageById(imageId, dicom_element) {
|
||||
cornerstone.loadImage(imageId).then(b => {
|
||||
cornerstone.displayImage(dicom_element, b);
|
||||
});
|
||||
}
|
||||
|
||||
function urltoFile(url, filename, mimeType) {
|
||||
return fetch(url)
|
||||
.then(function (res) {
|
||||
|
||||
+3
-1
@@ -24,11 +24,13 @@
|
||||
<main>
|
||||
<h1>A dicom viewer</h1>
|
||||
|
||||
<div id="dicom-viewer" class="dicom-viewer" style="height: 600px;" data-images='["test_images/1.jpg","test_images/IMG1.dcm"]' data-annotations=""></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", "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/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-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>
|
||||
<footer></footer>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user