fishtank.io.read_img

Contents

fishtank.io.read_img#

fishtank.io.read_img(path, colors=None, z_slices=None, z_project=False, shape=None, color_order=None, plugin=None, **plugin_args)#

Read image file.

Parameters:
  • path (str | Path) – Image file path.

  • colors (Union[int, str, list, None] (default: None)) – List of color indices to read.

  • z_slices (Union[int, list, None] (default: None)) – List of z-slice indices to read.

  • z_project (bool (default: False)) – If True, z-project the image.

  • shape (Optional[tuple] (default: None)) – Shape of a single frame.

  • color_order (Optional[list] (default: None)) – Order of colors in the image.

  • plugin (Optional[str] (default: None)) – Name of skimage plugin used to load image if not dax format.

  • plugin_args – Passed to the given plugin

Return type:

tuple[ndarray, dict]

Returns:

img

a numpy array, such that a gray image is (Y,X), a 3D gray image is (Z,Y,X), and 3D multi-channel image is (C,Z,Y,X).

attrs

a dictionary of image attributes.