aicsimageio.readers.reader.Reader

class aicsimageio.readers.reader.Reader(image: Any, **kwargs: Any)[source]

A small class to build standardized image reader objects that deal with the raw image and metadata.

Parameters
  • image (Any) – Some type of object to read and follow the Reader specification.

  • fs_kwargs (Dict[str, Any]) – Any specific keyword arguments to pass down to the fsspec created filesystem. Default: {}

Notes

It is up to the implementer of the Reader to decide which types they would like to accept (certain readers may not support buffers for example).

__init__(image: Any, **kwargs: Any)[source]

Methods

__init__(image, **kwargs)

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.

physical_pixel_sizes

returns

sizes -- Using available metadata, the floats representing physical pixel sizes for

scenes

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.