This commit is contained in:
Ross
2021-02-17 10:25:25 +00:00
parent 753b020ce7
commit 4d873b6e91
2 changed files with 14 additions and 9 deletions
+12 -5
View File
@@ -81,9 +81,10 @@ window.addEventListener('loadDicomViewer', function (e) {
//console.log($("#image_form_set img"));
$(e.detail).each((n, el) => {
images.push($(el).attr("src"));
} );
});
//console.log("listen2", images)
loadDicomViewer(images); }, false);
loadDicomViewer(images);
}, false);
function loadDicomViewer(images_to_load) {
console.log("loadDicomViewer", images_to_load);
@@ -105,9 +106,15 @@ function loadDicomViewer(images_to_load) {
if (annotations != undefined && annotations.indexOf(",") > 0) {
annotations = annotations;
}
let load_as_stack;
if (images.length > 5) {
load_as_stack = true;
} else {
load_as_stack = false;
}
if (images) {
dicomViewer.loadCornerstone($(single_dicom), null, images, annotations, true);
dicomViewer.loadCornerstone($(single_dicom), null, images, annotations, load_as_stack);
}
}
}
@@ -365,8 +372,8 @@ function keyDownHandler(e) {
function create_popup_window(url, title) {
newwindow=window.open(url,title,'height=800,width=600');
if (window.focus) {newwindow.focus()}
newwindow = window.open(url, title, 'height=800,width=600');
if (window.focus) { newwindow.focus() }
return false;
}
-2
View File
@@ -792,8 +792,6 @@ def exam_scores_cid(request, pk):
user_answers[cid].append("")
by_question[q].append(("", 0))
continue
elif s.normal:
ans = "Normal"
else:
ans = s.answer
answer_score = s.get_answer_score()