image_io.single_position_to_zarr sets the chunk and shape value for any of the default axes (time, channel, z, y, x) that's not present in the structure of the shape attribute of the given image to 1. But this means that the value of the chunks and of the shape key in the zarr metadata can be incorrect, alleging that the underlying data array has dimensions which aren't really there.
This can be hacked around by doing single-value slice indexing into the underlying numpy array so that any singleton dimension is preserved, but we should have a cleaner solution, in which we don't meddle with the actual structure of the data in order to have it conform to our metadata specification.
image_io.single_position_to_zarr
sets the chunk and shape value for any of the default axes (time, channel, z, y, x) that's not present in the structure of theshape
attribute of the given image to 1. But this means that the value of thechunks
and of theshape
key in the zarr metadata can be incorrect, alleging that the underlying data array has dimensions which aren't really there.Requirement for
chunks
andshape
: https://zarr.readthedocs.io/en/stable/spec/v2.htmlThis can be hacked around by doing single-value slice indexing into the underlying numpy array so that any singleton dimension is preserved, but we should have a cleaner solution, in which we don't meddle with the actual structure of the data in order to have it conform to our metadata specification.