Napari - fix time axis to roll only through spatial dimensions

Dear napari developers and users,

is there a way to fixate one axis when rolling through the dimensions?
I would like to display 3D time series and be able to roll through the spatial dimensions of the image without moving the time axis. This is important to correctly display the images and be able to access all possible 2D slice views of the image.

Is there such an option I missed in the documentation?

This is on my to-do list. Currently it cannot be done from the UI. However, it can be done using the console. If your image has axes tzyx, then:

viewer.dims.order = (0, 2, 1, 3)

will display the zx plane, while

viewer.dims.order = (0, 3, 1, 2)

will display zy.

I hope this helps in the meantime!

1 Like

Thanks for the fast reply.

So I did not miss anything in the documentation :slight_smile:

I will overwrite the button with a custom solution then.

Best regards,

@ch-n if you have something general purpose we might welcome this as a contribution to the main repo. See in this PR how @talley has added an addition context dialog to the 3D viewing button that allows perspective to be changed, we could add an addition context dialog that allowed you to skip/ include axes when rolling. Open to other ideas too, but it should be general and not hard coded add FOV to camera model and slider popup by tlambert03 · Pull Request #2636 · napari/napari · GitHub

If I find the time to write a general solution I will post here.
Luckily or sadly, how ever one want to see, this is one of my less important challenges at the moment :slight_smile:

1 Like