imageio.plugins.tifffile_v3.TifffilePlugin.read¶
- TifffilePlugin.read(*, index: int = None, page: int = None, **kwargs) ndarray[source]¶
Read a ndimage or page.
The ndimage returned depends on the value of both
indexandpage.indexselects the series to read andpageallows selecting a single page from the selected series. Ifindex=None,pageis understood as a flat index, i.e., the selection ignores individual series inside the file. If bothindexandpageareNone, then all the series are read and returned as a batch.- Parameters:
- indexint
If
int, select the ndimage (series) located at that index inside the file and returnpagefrom it. IfNoneandpageisintread the page located at that (flat) index inside the file. IfNoneandpage=None, read all ndimages from the file and return them as a batch.- pageint
If
Nonereturn the full selected ndimage. Ifint, read the page at the selected index and return it.- kwargsAny
Additional kwargs are forwarded to TiffFile’s
as_arraymethod.
- Returns:
- ndarraynp.ndarray
The decoded ndimage or page.