Setting scale for z-dimension

I am trying to use napari to view confocal images with 30-40 z-stacks that are 0.5 microns apart and it appears like they are squished together. Is there a way I can make them display with the stacks further apart?

I’m just using io from sci-kit image to load the images and napari to view them:

%gui qt5
import skimage
from skimage import io
import napari

image = io.imread('myImage.tif')
viewer = napari.view_image(image)

Hi @savagej3 you can use the scale keyword argument to control the spacing of the stacks in your image.

Here I make some simulated image data, with 10 z-slices of images that are 100x100 pixels in XY. I tell napari using the scale argument that my z-slices need to be spaced out 10x more, so my data looks like a cube in the 3D viewer.

import napari
import numpy as np

image = np.random.random((10, 100, 100))
napari.view_image(image, scale=[10, 1, 1])

I hope that helps!


Awesome, thanks so much