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
150 stars 53 forks source link

write_image with scalar chunks only sets chunks of last axis #364

Closed dstansby closed 4 months ago

dstansby commented 6 months ago

I'm trying to set the same chunk size in each dimension when writing a file. In zarr this is easily done by giving an integer value to the chunks parameter. From the docs for zarr.creation.create:

If an int, the chunk size in each dimension will be given by the value of chunks.

If I do this in ome-zarr using the following code, only the chunk size of the last dimension is set:

write_image(
    image=arr,
    group=root,
    axes="xyz",
    storage_options={'chunks': 64},
    scaler=None
)

The chunks on the resulting dataset are (512, 512, 64). I would expect them to be (64, 64, 64).