ome / ZarrReader

Other
6 stars 9 forks source link

HCS and handling of row/column index keys #33

Closed sbesson closed 2 years ago

sbesson commented 2 years ago

See original report from @pwalczysko in https://github.com/ome/ZarrReader/issues/31#issuecomment-1118978361_

Index keys for the well rows/columns were initially introduced in https://github.com/glencoesoftware/bioformats2raw/pull/91 and first released in the version 0.3.0 of bioformats2raw.

These keys have been formalized and specified upstream in the OME-NGFF 0.4 specification - see https://ngff.openmicroscopy.org/0.4/#plate-md. As part of this specification, they have been renamed as rowIndex and columnIndex to match the naming style for new keys.

In both cases, these indices are expected to be integers.

https://github.com/ome/ZarrReader/blob/649a60e33c9f91323f571abef4454118da6b3d73/src/loci/formats/in/ZarrReader.java#L634-L652 currently handles legacy keys and casts them as strings. This leads to exceptions when dealing with HCS generated with bioformats2raw 0.4.0.

For the OME-NGFF 0.4.0 specification, we should at minimum read the rowIndex/columnIndex keys as Integer.

This leaves a few open questions related to the support of old and new datasets:

The last item more generally raises the question of how lenient vs strictly compliant the reader should be. If there is a use case for both behaviors, this is possible something worth putting under an option.

dgault commented 2 years ago

With the latest commits on https://github.com/ome/ZarrReader/pull/31, the reader should now handle 3 different scenarios for the row and column indexes: