ome / omero-cli-zarr

https://pypi.org/project/omero-cli-zarr/
GNU General Public License v2.0
15 stars 10 forks source link

Choose smallest np.dtype that handles labels data #116

Closed will-moore closed 2 years ago

will-moore commented 2 years ago

Fixes #115

This PR

To test: export labels and check dtype (was previously "<i8"):

$ omero zarr export Image:6001240
$ omero zarr masks Image:6001240

$ cat 6001240.zarr/labels/0/0/.zarray | grep dtype
    "dtype": "<i2",

Napari should still show masks correctly, with omero IDs shown when mousing over shapes:

$ napari --plugin napari-ome-zarr 6001240.zarr

Mousing over label at bottom-left:

Screenshot 2022-05-27 at 12 41 35

Check shape ID: https://idr.openmicroscopy.org/iviewer/?shape=1664664

will-moore commented 2 years ago

Thanks @sbesson. Both those issues should be fixed now.

6001247.zarr labels are exported as "dtype": "|i1",

will-moore commented 2 years ago

https://github.com/ome/omero-cli-zarr/pull/107 would be nice to get it. Not tested yet, but I just tried it on top of this branch and it's looking good.

sbesson commented 2 years ago

Make complete sense since it also brings improvments to the label image writing. I'll put in on my review list and make use of the samples I generated above as the ground truth