Skip to content

Import Images

Widget: Open Files

Screenshot

Screenshot

Open a file and return a napari layer.
  • File type: None
  • File path: Select a file to be imported, the file can be a tiff, h5, png, jpg.
  • Layer name: Define the name of the output layer, default is either image or label.
  • Layer type: Select the type of input you are loading.
  • Stack layout: t for time, c for channel, xyz for dimensions, e.g.: tzyxc will be reshaped to [T][C][Z]YX. Invert an axis by adding `-` infront of the letter. Truncate the data before importing with a slice after the letters, e.g. txyz[:3,:,:]: the entries follow the layout as written, before reordering, an integer drops its axis.

Stack Layout

When you pick a file, the Stack layout field is prefilled. OME-TIFF files use the axis string from their OME-XML metadata, h5 and zarr files use the axis_order attribute written on export, and everything else falls back to a guess from the array shape. The layout can be any permutation of the letters t, c, z, y, x that match your file, so a 3D time series gets prefilled as TZYX.
You can invert an axis by prepending it with a minus. Also you can slice the data by appending, e.g. tczxy[:10,2] to only load the first ten frames of the third channel.
The slicing functionality can also be used for cropping already during the import (CXYZ[1,:50,:50,:10]).