-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comparison of OME-Zarr libs #407
Comments
Thinking about what ome-zarr-py should look like, following release of zarr-python v3... Some random thoughts: We need to address scaling - we have some scaling that supports dask and 3D downsampling and others that don't. Also, python-based validation is something we need to support (several requests from the community) - Do we include pydantic-ome-ngff/ome-zarr-models-py as a dependency? How do we define the "API" that is (for example) consumed by napari-ome-zarr? It's kinda based on the napari reader API but with a few differences (I think)? What are the prime functions of ome-zarr-py? (and what alternatives exist)
It seems most of the "solutions" for OME-Zarr creation from image.sc above are based on using ome-zarr-py for metadata generation, but handling array writing themselves. (similar strategy in omero-cli-zarr). If we adopt ome-zarr-models-py for metadata creation then we don't need ome-zarr-py so much. Validation should be handled by ome-zarr-models-py. We do need some fully n-dimensional, dask-compatible tool for scaling: E.g. Take a single-dataset OME-Zarr and build the pyramid, downsampling in x,y,z (not c, t etc). What are the "graph traversal" functionalities / API that we need? Is this mostly needed for
Every time I come back to ome-zarr-py and need to refresh my memory, it takes a while to grok how all the Node, Spec, Reader, ZarrLocation classes etc. work together. Either we need to document this better or maybe it can be simplified in some way? |
Discussion with @joshmoore @jburel notes at https://docs.google.com/document/d/13dmZLaozQ6VOu41bJROfDhmmsbfSCYtVx_sWScKdMhk/edit?tab=t.0 Summary:
|
Some discussion about potential changes to ome-zarr-py at #402 inspired me to check out other OME-Zarr libs to understand alternative ways of structuring things...
Work in progres....
ngff-zarr
https://github.com/thewtex/ngff-zarr
Testing example at https://ngff-zarr.readthedocs.io/en/latest/quick_start.html
example.ome.zarr/scale0/image/.zarray
withexample.ome.zarr/scale0/.zattrs
for xarray_ARRAY_DIMENSIONS
nz.to_multiscales(image, scale_factors=[2,4,8], chunks=64)
generates aMultiscales
data object with data as dask delayed pyramid.(1, 512, 512, 512)
since it fails to downsample - trying to downsample all dimensions?axes
metadata forzyx
(allspace
) no units etc.pydantic-ome-ngff
https://github.com/janeliascicomp/pydantic-ome-ngff
ome-zarr-py
write_image()
automatically does pyramid generation -> multiscales, down to "thumbnail" 👍ngff-writer
https://github.com/aeisenbarth/ngff-writer/
Not up to date. Supports OME-Zarr v0.3
resize()
is copied into ome-zarr-py.omero
section for channel names.Others
https://github.com/CBI-PITT/stack_to_multiscale_ngff - Python based command like tool - E.g TIFFs to OME-Zarr
https://github.com/bioio-devs/bioio - uses https://github.com/bioio-devs/bioio-ome-zarr which uses ome-zarr-py.
forum.image.sc discussions
Useful to see what the community is needing and the solutions they find. Searching image.sc
https://forum.image.sc/search?q=write%20ome-zarr
omero_zarr.raw_pixels import downsample_pyramid_on_disk
write_multiscales_metadata(root, datasets, axes=axes)
but that doesn't really do much for you!ome_zarr.writer.write_multiscale()
stacked_image[:,:,x,y] = np.array(Image.open(img_list[x])).astype("uint16")
The text was updated successfully, but these errors were encountered: