ome-zarr-py icon indicating copy to clipboard operation
ome-zarr-py copied to clipboard

Plate loading for wells with varying zyx dimensions

Open jluethi opened this issue 1 year ago • 0 comments

Currently, the plate loading assumes all wells have the same dimensions in zyx and fails in different ways when this is not the case.

For example, if the wells have a different number of Z planes, it tries to load the number of z planes from the first well for each well. If all other wells have at least as many z planes

When wells have different xy sizes, in my experience what happens is that it just doesn't load anything, but also doesn't throw an error message.

The source of that is that the current plate loading gets the information about well layouts exclusively from the first well, see https://github.com/ome/ome-zarr-py/blob/db0f5dc6eea4ee1ca03598fee8542177e253be29/ome_zarr/reader.py#L504

This has performance benefits it the assumption holds true (not having to look at the metadata for each well). But we have more and more use-cases where these assumptions don't hold anymore. Many 3D HCS plates have different number of Z planes per well for us. When saving whole wells as single images (see https://github.com/ome/ngff/pull/137), the xy dimension can vary in some use cases etc.

I'm providing a draft PR to address this.

jluethi avatar Jan 19 '23 10:01 jluethi