Controlling z plane of image shown in napari viewer

I’m hoping to find the napari viewer method that lets me set (and ideally also get) which z-plane of a 3d image stack is currently visible in the viewer. Can anyone point me to this?

I tried viewer.layers[‘myimage’].set_view_slice, but was not clear how this should be called since it doesn’t appear to take an argument.


Yeah that one isn’t obvious enough (we’ll be working on dims and slicing soon). I think you’re looking for viewer.dims.set_point,

and retrieve the current index for all dimensions with viewer.dims.point

1 Like

perfect, thanks Talley!