imageio.plugins.tifffile_v3.TifffilePlugin.read#
- TifffilePlugin.read(*, index: Optional[int] = None, page: Optional[int] = None, **kwargs) ndarray [source]#
Read a ndimage or page.
The ndimage returned depends on the value of both
index
andpage
.index
selects the series to read andpage
allows selecting a single page from the selected series. Ifindex=None
,page
is understood as a flat index, i.e., the selection ignores individual series inside the file. If bothindex
andpage
areNone
, 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 returnpage
from it. IfNone
andpage
isint
read the page located at that (flat) index inside the file. IfNone
andpage=None
, read all ndimages from the file and return them as a batch.- pageint
If
None
return the full selected ndimage. Ifint
, read the page at the selected index and return it.- kwargsAny
Additional kwargs are forwarded to TiffFile’s
as_array
method.
- Returns:
- ndarraynp.ndarray
The decoded ndimage or page.