This commit is contained in:
Ross
2021-12-04 16:38:28 +00:00
parent b683c4c899
commit aac2cedade
-5
View File
@@ -1179,17 +1179,12 @@ export function getNextAnnotationImage(element) {
const image_ids = enabled_element.toolStateManager.toolState.stack.data[0].imageIds;
const current_image = enabled_element.toolStateManager.toolState.stack.data[0].currentImageIdIndex;
const annotated_images = Object.getOwnPropertyNames(cornerstoneTools.globalImageIdSpecificToolStateManager.toolState);
console.log("getNextAnnotationImage", image_ids, current_image, annotated_images);
if (annotated_images.length > 0) {
let offset = current_image;
for( let i=0; i < image_ids.length; i++) {
console.log("i", i)
let pointer = (i + offset) % image_ids.length;
console.log("pointer", pointer, image_ids[pointer]);
console.log(annotated_images);
if (annotated_images.includes(image_ids[pointer])) {
console.log("load")
loadStackIndex(pointer, element);
}