fixes
This commit is contained in:
@@ -53,8 +53,17 @@ $(document).ready(function () {
|
||||
|
||||
let single_dicom = document.getElementById("single-dicom-viewer");
|
||||
if (single_dicom) {
|
||||
let images = single_dicom.dataset.images.split(",");
|
||||
let annotations = single_dicom.dataset.annotations.split(",");
|
||||
|
||||
let images = single_dicom.dataset.images;
|
||||
if (images.indexOf(",") > 0) {
|
||||
images = images.split(",");
|
||||
}
|
||||
|
||||
let annotations = single_dicom.dataset.annotations;
|
||||
if (annotations != undefined && annotations.indexOf(",") > 0) {
|
||||
annotations = annotations;
|
||||
}
|
||||
|
||||
dicomViewer.loadCornerstone($(single_dicom), null, images, annotations);
|
||||
}
|
||||
|
||||
@@ -112,24 +121,6 @@ function prepAnswerData() {
|
||||
$("#id_marked_answers").val(JSON.stringify(window.marked_answers));
|
||||
}
|
||||
|
||||
function getJsonToolStateNoId() {
|
||||
const el = document.getElementById("dicom-image");
|
||||
|
||||
const c = cornerstone.getEnabledElement(el);
|
||||
|
||||
const toolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager;
|
||||
|
||||
const image_id = c.image.imageId;
|
||||
|
||||
const state_with_id = toolStateManager.saveToolState()
|
||||
|
||||
const json_tool_state = JSON.stringify(state_with_id[image_id]);
|
||||
|
||||
return json_tool_state;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function loadJsonToolStateOnCurrentImage(json) {
|
||||
let el = document.getElementById("dicom-image");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user