Closed talonchandler closed 1 year ago
A bit more context here - this dataset has several 3D channels (ZYX) and one 2D channel, i.e. one image of a single z-plane placed at z=n_slices//2 index in the metadata. You can get that if you uncheck "acquire z-stack" (or something similar) for a given channel in the MDA.
It's likely because the array is initialized as 'empty' instead of 'zeros': https://github.com/czbiohub/iohub/blob/e96e3ccdca4d2396a358c847a90e314c7dfc7665/iohub/multipagetiff.py#L269-L273 And Zarr docs notes:
The contents of an empty Zarr array are not defined. On attempting to retrieve data from an empty Zarr array, any values may be returned, and these are not guaranteed to be stable from one access to the next.
A note to our future selves that being deterministic is the important. Also filling Zarr arrays with zeros (fill_value: 0
) doesn't write any chunks with zarr>=2.11
, so the need for zarr.empty()
should be rare now.
Here's a minimal demonstration of the issue
Notes
get_zarr
callsget_array
, open the dataset in MM, or open withnapari
'sbuiltin
readerconverter
branch with the newimread
function, and I also confirmed that it was inherited from theWaveorderReader
.Symptoms:
recorder view
usesget_zarr
(currently theWaveorderReader
version...with the same behaviour) and behaves erratically when you scroll through Z in napariget_array
for now), but it is an strong inconvenience since it blocks many of thenapari
viewing conveniences that we're used to.