Reader (ome_zarr.reader
)
Reading logic for ome-zarr.
- class ome_zarr.reader.Label(node: Node)
An additional aspect to a multiscale image is that it can be a labeled image, in which each discrete pixel value represents a separate object.
- static matches(zarr: ZarrLocation) bool
If label-specific metadata is present, then return true.
- class ome_zarr.reader.Labels(node: Node)
Relatively small specification for the well-known “labels” group which only contains the name of subgroups which should be loaded as labeled images.
- static matches(zarr: ZarrLocation) bool
Does the Zarr Image group also include a /labels sub-group?
- class ome_zarr.reader.Multiscales(node: Node)
- static matches(zarr: ZarrLocation) bool
is multiscales metadata present?
- class ome_zarr.reader.Node(zarr: ZarrLocation, root: Node | Reader | List[ZarrLocation], visibility: bool = True, plate_labels: bool = False)
Container for a representation of the binary data somewhere in the data hierarchy.
- add(zarr: ZarrLocation, prepend: bool = False, visibility: bool | None = None, plate_labels: bool = False) Node | None
Create a child node if this location has not yet been seen.
Newly created nodes may be considered higher or lower priority than the current node, and may be set to invisible if necessary.
- Parameters:
zarr – Location in the node hierarchy to be added
prepend – Whether the newly created node should be given higher priority than the current node, defaults to False
visibility – Allows setting the node (and therefore layer) as deactivated for initial display or if None the value of the current node will be propagated to the new node, defaults to None
- Returns:
Newly created node if this is the first time it has been encountered; None if the node has already been processed.
- class ome_zarr.reader.PlateLabels(node: Node)
- class ome_zarr.reader.Reader(zarr: ZarrLocation)
Parses the given Zarr instance into a collection of Nodes properly ordered depending on context.
Depending on the starting point, metadata may be followed up or down the Zarr hierarchy.