aicsimageio.readers.tiff_reader.TiffReader
- class aicsimageio.readers.tiff_reader.TiffReader(image: Union[str, Path], chunk_dims: Union[str, List[str]] = ['Z', 'Y', 'X', 'S'], dim_order: Optional[Union[List[str], str]] = None, channel_names: Optional[Union[List[str], List[List[str]]]] = None, fs_kwargs: Dict[str, Any] = {}, **kwargs: Any)[source]
Wraps the tifffile API to provide the same aicsimageio Reader API but for volumetric Tiff (and other tifffile supported) images. :Parameters: * image (types.PathLike) – Path to image file to construct Reader for.
chunk_dims (Union[str, List[str]]) – Which dimensions to create chunks for. Default: DEFAULT_CHUNK_DIMS Note: Dimensions.SpatialY, Dimensions.SpatialX, and DimensionNames.Samples, will always be added to the list if not present during dask array construction.
dim_order (Optional[Union[List[str], str]]) – A string of dimensions to be applied to all array(s) or a list of string dimension names to be mapped onto the list of arrays provided to image. I.E. “TYX”. Default: None (guess dimensions for single array or multiple arrays)
channel_names (Optional[Union[List[str], List[List[str]]]]) – A list of string channel names to be applied to all array(s) or a list of lists of string channel names to be mapped onto the list of arrays provided to image. Default: None (create OME channel IDs for names for single or multiple arrays)
fs_kwargs (Dict[str, Any]) – Any specific keyword arguments to pass down to the fsspec created filesystem. Default: {}
- __init__(image: Union[str, Path], chunk_dims: Union[str, List[str]] = ['Z', 'Y', 'X', 'S'], dim_order: Optional[Union[List[str], str]] = None, channel_names: Optional[Union[List[str], List[List[str]]]] = None, fs_kwargs: Dict[str, Any] = {}, **kwargs: Any)[source]
Methods
__init__
(image[, chunk_dims, dim_order, ...])get_dask_stack
(**kwargs)Get all scenes stacked in to a single array.
get_image_dask_data
([dimension_order_out])Get specific dimension image data out of an image as a dask array.
get_image_data
([dimension_order_out])Read the image as a numpy array then return specific dimension image data.
get_mosaic_tile_position
(mosaic_tile_index, ...)Get the absolute position of the top left point for a single mosaic tile.
get_mosaic_tile_positions
(**kwargs)Get the absolute positions of the top left points for each mosaic tile matching the specified dimensions and current scene.
get_stack
(**kwargs)Get all scenes stacked in to a single array.
get_xarray_dask_stack
(**kwargs)Get all scenes stacked in to a single array.
get_xarray_stack
(**kwargs)Get all scenes stacked in to a single array.
is_supported_image
(image[, fs_kwargs])Asserts that the provided image like object is supported by the current Reader.
set_scene
(scene_id)Set the operating scene.
Attributes
channel_names
- returns
channel_names -- Using available metadata, the list of strings representing channel names.
current_scene
- returns
scene -- The current operating scene.
current_scene_index
- returns
scene_index -- The current operating scene index in the file.
dask_data
- returns
dask_data -- The image as a dask array with the native dimension ordering.
data
- returns
data -- The image as a numpy array with native dimension ordering.
dims
- returns
dims -- Object with the paired dimension names and their sizes.
dtype
- returns
dtype -- Data-type of the image array's elements.
metadata
- returns
metadata -- The metadata for the formats supported by the inhereting Reader.
mosaic_dask_data
- returns
dask_data -- The stitched together mosaic image as a dask array.
mosaic_data
- returns
data -- The stitched together mosaic image as a numpy array.
mosaic_tile_dims
- returns
tile_dims -- The dimensions for each tile in the mosaic image.
mosaic_xarray_dask_data
- returns
xarray_dask_data -- The delayed mosaic image and metadata as an annotated data array.
mosaic_xarray_data
- returns
xarray_dask_data -- The in-memory mosaic image and metadata as an annotated data array.
ome_metadata
- returns
metadata -- The original metadata transformed into the OME specfication.
Return the physical pixel sizes of the image.
- returns
scenes -- A tuple of valid scene ids in the file.
shape
- returns
shape -- Tuple of the image array's dimensions.
xarray_dask_data
- returns
xarray_dask_data -- The delayed image and metadata as an annotated data array.
xarray_data
- returns
xarray_data -- The fully read image and metadata as an annotated data array.