How to use python to scroll through a dataset

Hi
I use slicer alot in education but am very new to programing. I would like to make a python script that scrolls through a dataset from the first to the last image in z.
So ideally it should be able to get the min and max for the active slice and the scroll through it one by one.

Can anyone give me some advice as how i should get started. For instance what is the easiest way to find the commands needed?

Any help in the right directions is very appreciated.

1 Like

If it is auto-scrolling that you desire, I would suggest to first look into the “AutoScroll” extension available to install through the Slicer Extensions Manager.

The associated code for AutoScroll can be reviewed at the following:

1 Like

Thank you this is a very useful start
Basically what i would like to do is scroll through the image as fast as possible and check the time. So use it as a kind of benchmark tool. I think some small modifications on this one should make that work very well.