aicsimageio.readers.ome_tiff_reader.OmeTiffReader
- class aicsimageio.readers.ome_tiff_reader.OmeTiffReader(image: Union[str, Path], chunk_dims: Union[str, List[str]] = ['Z', 'Y', 'X', 'S'], clean_metadata: bool = True, fs_kwargs: Dict[str, Any] = {}, **kwargs: Any)[source]
Wraps the tifffile and ome-types APIs to provide the same aicsimageio Reader API but for volumetric OME-TIFF images. :Parameters: * image (types.PathLike) – Path to image file to construct Reader for.
chunk_dims (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.
clean_metadata (bool) – Should the OME XML metadata found in the file be cleaned for known AICSImageIO 3.x and earlier created errors. Default: True (Clean the metadata for known errors)
fs_kwargs (Dict[str, Any]) – Any specific keyword arguments to pass down to the fsspec created filesystem. Default: {}
Notes
If the OME metadata in your file isn’t OME schema compilant or does not validate this will fail to read your file and raise an exception. If the OME metadata in your file doesn’t use the latest OME schema (2016-06), this reader will make a request to the referenced remote OME schema to validate.
- __init__(image: Union[str, Path], chunk_dims: Union[str, List[str]] = ['Z', 'Y', 'X', 'S'], clean_metadata: bool = True, fs_kwargs: Dict[str, Any] = {}, **kwargs: Any)[source]
Methods
__init__
(image[, chunk_dims, ...])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.
- returns
metadata -- The original metadata transformed into the OME specfication.
- returns
sizes -- Using available metadata, the floats representing physical pixel sizes for
- 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.