Getting started¶
Installation¶
pip install ome-zarr-io
To validate remote (URL) filesets, install the optional extra:
pip install "ome-zarr-io[remote]"
From source¶
To get the latest development version:
git clone https://github.com/Turku-BioImaging/ome-zarr-io.git
cd ome-zarr-io
pip install -e .
Terminology¶
This project follows the OME-Zarr 0.5 specification:
Image: a Zarr group with
multiscalesmetadata. It holds a pyramid of resolution levels (one array per level) and may also carry channel metadata and labels.Writerwrites images andReaderreads them.Image data: the NumPy or Dask array you pass in (the
image=argument), as opposed to the image on disk.Resolution level: one array of an image’s pyramid. Level
Lisdownscale_factor ** Ltimes smaller than the original in Y and X (downscale_factormust be an integer >= 2; default2). Pixels that don’t fill a whole block at the bottom/right edge are dropped at coarser levels.Writerbuilds the levels withdownscale_levels,downscale_factoranddownscale_method:"mean"(default): averages each block of pixels (a box filter followed by subsampling). Use for intensity images."nearest": takes one pixel per block. Preserves discrete values; use for labels and segmentation masks."gaussian": deprecated alias for"mean".
Label image: an image stored under an image’s
labels/group.Plate, well, field: the high-content-screening layout
plate/<row>/<column>/<field>. A field (of view) is an image.Fileset: the whole hierarchy of Zarr groups under one path. It can be an image, a plate, a well or a bioformats2raw collection.
validate()and the command line accept any fileset;ReaderandWriter.from_existingneed an image, so for a plate pass one of its fields.