.
This commit is contained in:
@@ -1179,17 +1179,12 @@ export function getNextAnnotationImage(element) {
|
|||||||
const image_ids = enabled_element.toolStateManager.toolState.stack.data[0].imageIds;
|
const image_ids = enabled_element.toolStateManager.toolState.stack.data[0].imageIds;
|
||||||
const current_image = enabled_element.toolStateManager.toolState.stack.data[0].currentImageIdIndex;
|
const current_image = enabled_element.toolStateManager.toolState.stack.data[0].currentImageIdIndex;
|
||||||
const annotated_images = Object.getOwnPropertyNames(cornerstoneTools.globalImageIdSpecificToolStateManager.toolState);
|
const annotated_images = Object.getOwnPropertyNames(cornerstoneTools.globalImageIdSpecificToolStateManager.toolState);
|
||||||
console.log("getNextAnnotationImage", image_ids, current_image, annotated_images);
|
|
||||||
|
|
||||||
if (annotated_images.length > 0) {
|
if (annotated_images.length > 0) {
|
||||||
let offset = current_image;
|
let offset = current_image;
|
||||||
for( let i=0; i < image_ids.length; i++) {
|
for( let i=0; i < image_ids.length; i++) {
|
||||||
console.log("i", i)
|
|
||||||
let pointer = (i + offset) % image_ids.length;
|
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])) {
|
if (annotated_images.includes(image_ids[pointer])) {
|
||||||
console.log("load")
|
|
||||||
loadStackIndex(pointer, element);
|
loadStackIndex(pointer, element);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user