Option to play a stack through only once (no looping)

Hi all,

I have a user who was wondering if it’s possible to play their stack but have it not loop back to the start. Tried to search for an answer and felt like it isn’t possible but thought I’d ask in case I missed something.

Laura

You can set this in the “animation options” dialog, Image -> Stacks -> Animation -> Animation Options.

Sorry, should have checked first, it appears that is not an option at least in this dialog box.

As @Hazen_Babcock already noted you can find this in the animation options (disable the option “Loop forth and back”), see (scroll down):

https://imagejdocu.tudor.lu/gui/image/stacks

Another simple and custom method would be to use a simple macro function like:

run("MRI Stack (528K)");
for (i = 0; i < nSlices; i++) {
    Stack.setSlice(i + 1);
    wait(200);
}

Disabling the option “Loop forth and back" means it won’t loop back and forth but it will still loop. Once the stack reaches the end of the stack it will go back to the first frame and start again. I was looking for a way to play it once through only.

I like the macro idea, I did offer basically the same one to the user but they were hoping for a setting.

@lmurphy Yes you are right I thougt it would stop. So the macro still holds. In the Dynamic_Plot.ijm example it is also done this way.

1 Like