Skip to main content
`Ctrl`+`K`

# imageio.plugins.tifffile_v3.TifffilePlugin.read

TifffilePlugin.read(*, index: int = None, page: int = None, **kwargs) → ndarray

  Read a ndimage or page.

  The ndimage returned depends on the value of both `index` and `page`. `index` selects the series to read and `page` allows selecting a single page from the selected series. If `index=None`, `page` is understood as a flat index, i.e., the selection ignores individual series inside the file. If both `index` and `page` are `None`, then all the series are read and returned as a batch.

  Parameters:
    index int

      If `int`, select the ndimage (series) located at that index inside the file and return `page` from it. If `None` and `page` is `int` read the page located at that (flat) index inside the file. If `None` and `page=None`, read all ndimages from the file and return them as a batch.

    page int

      If `None` return the full selected ndimage. If `int`, read the page at the selected index and return it.

    kwargs Any

      Additional kwargs are forwarded to TiffFile’s `as_array` method.

  Returns:
    ndarray np.ndarray

      The decoded ndimage or page.