ome / ome-zarr-py

Implementation of next-generation file format (NGFF) specifications for storing bioimaging data in the cloud.
https://pypi.org/project/ome-zarr
Other
148 stars 52 forks source link

ome_zarr info: add options to introspect nested Zarr groups #112

Open sbesson opened 2 years ago

sbesson commented 2 years ago

Taking the output of bioformat2raw 0.3.0 which is a collection of OME-Zarr multiscale images as an example:

bioformats2raw "test&series=2.fake" "test.zarr"
(zarr) [sbesson@pilot-zarr1-dev ~]$ ome_zarr info test.zarr/
(zarr) [sbesson@pilot-zarr1-dev ~]$

returns nothing but the leaves can be introspected:

(zarr) [sbesson@pilot-zarr1-dev ~]$ ome_zarr info test.zarr/0/
/home/sbesson/test.zarr/0 [zgroup]
 - metadata
   - Multiscales
 - data
   - (1, 1, 1, 512, 512)
   - (1, 1, 1, 256, 256)
(zarr) [sbesson@pilot-zarr1-dev ~]$ ome_zarr info test.zarr/1/
/home/sbesson/test.zarr/1 [zgroup]
 - metadata
   - Multiscales
 - data
   - (1, 1, 1, 512, 512)
   - (1, 1, 1, 256, 256)

We might want to introduce some flags allow to scan a Zarr group without any OME-specific metadata. While the use case above is trivial, this will bring typical scalability issues associated with scanning a nested layout and/or loading metadata from a lot of leaves.

/cc @dominikl @pwalczysko

sbesson commented 2 years ago

See also https://github.com/ome/omero-cli-zarr/pull/82#issuecomment-938666957 for another use case: being able to introspect an image with associated labels