Utilities (ome_zarr.utils)
Utility methods for ome_zarr access.
- ome_zarr.utils.download(input_path: str, output_dir: str = '.') None[source]
Download an OME-Zarr from the given path.
All
Nodesthat are found from the given path will be included in the download.
- ome_zarr.utils.info(path: str, stats: bool = False) Iterator[Node][source]
Print information about an OME-Zarr fileset.
All
Nodesthat are found from the given path will be visited recursively.- Parameters:
path – Path to OME-Zarr fileset.
stats – If True, print stats (currently just minimum/maximum of all arrays)
Warning
Passing
stats=Truewill trigger a full read of every array in the fileset.
- ome_zarr.utils.strip_common_prefix(parts: list[list[str]]) str[source]
Find and remove the prefix common to all strings.
Returns the last element of the common prefix. An exception is thrown if no common prefix exists.
>>> paths = [["a", "b"], ["a", "b", "c"]] >>> strip_common_prefix(paths) 'b' >>> paths [['b'], ['b', 'c']]