fix some more loading errors
This commit is contained in:
@@ -1084,6 +1084,10 @@ function onNewImage(e) {
|
||||
}
|
||||
|
||||
function checkAnonStatus(dataSet) {
|
||||
// dataSet will be undefined if the image is not a dicom
|
||||
if (dataSet == undefined) {
|
||||
return;
|
||||
}
|
||||
let accession_number = dataSet.string('x00080050').toLowerCase();
|
||||
let patient_id = dataSet.string('x00100020').toLowerCase();
|
||||
|
||||
|
||||
@@ -288,8 +288,13 @@
|
||||
console.log("loading stack index")
|
||||
dicomViewer.loadStackIndex(current_image_id_index, dicom_element);
|
||||
} else {
|
||||
console.log("loading next annotation image")
|
||||
dicomViewer.getNextAnnotationImage(dicom_element);
|
||||
try {
|
||||
dicomViewer.loadImageById(current_image_id_index, dicom_element);
|
||||
} catch (e) {
|
||||
console.log("loading image by id failed")
|
||||
console.log("loading next annotation image")
|
||||
dicomViewer.getNextAnnotationImage(dicom_element);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -307,7 +312,10 @@
|
||||
description: $('#id_description').val(),
|
||||
series: {{ series.pk }},
|
||||
//annotation_json: JSON.stringify(c.toolStateManager.saveToolState()),
|
||||
current_image_id_index: c.toolStateManager.toolState.stack.data[0].currentImageIdIndex,
|
||||
// This is the stack number
|
||||
//current_image_id_index: c.toolStateManager.toolState.stack.data[0].currentImageIdIndex,
|
||||
// but we want to use the current image id (so if the stack is reordered it still attaches to the correct image)
|
||||
current_image_id_index: c.toolStateManager.toolState.stack.data[0].imageIds[c.toolStateManager.toolState.stack.data[0].currentImageIdIndex],
|
||||
annotation_json: JSON.stringify(cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||
.saveToolState()),
|
||||
viewport_json: JSON.stringify(c.viewport),
|
||||
|
||||
Reference in New Issue
Block a user