czbiohub-sf / iohub

Pythonic and parallelizable I/O for N-dimensional imaging data with OME metadata
https://czbiohub-sf.github.io/iohub/
BSD 3-Clause "New" or "Revised" License
29 stars 7 forks source link

iohub conversion of MM data to zarr changes image size #198

Closed Soorya19Pradeep closed 1 year ago

Soorya19Pradeep commented 1 year ago

While using the iohub cli to convert MicroManager acquired ome-tiff files to zarr format, the x-y size of the images changes. I tested this on the dataset acquired on Hummingbird microscope, of size (T,C,Z,X,Y) [1,4,21,2048,2048]. On conversion of data to zarr using cli command iohub convert -i /path/to/input/ -o /path/to/output/ the size of data was reduced to [1,4,21,666,666].

On inspecting the .zarray file, I see that the chunking is still at [1,4,21,2048,2048], but the napari display of image shows a 666 by 666 image. Is this a real reduction of data or something that happens on loading the data into napari gui?

ziw-liu commented 1 year ago

This is because napari respects the voxel size metadata, and shows image coordinates in spatial units instead of voxels. If you do viewer.layers[0].shape in the console it should be the correct shape. In this case I'm guessing that your XY pixel size is 0.325 microns.