Closed dominikl closed 3 years ago
I haven't had time to fully understand / test this yet, but I would like to see the mask for each image in a Plate nested under that image in the plate hierarchy, so that if you do napari path/to/plate/0/A/A/0/
then you get the image loading with masks?
Hm, I thought the labels
directory is at the root level of the zarr file. Anyway, can move the labels in the image directory as well. Where do we actually have the current working 'spec' documented? With all the notes, PRs and comments scattered around everywhere, it's really hard to find things.
If a group X
has attrs "multiscales" then the labels for that are under X/labels
Done. Updated the PR description accordingly.
Or create your own masks with a simple segmentation.
Heh. This is great. I'm imaging on export a dialog, "Oh, you don't seem to have any masks, shall I segment your image for you?" :smile:
Created a plate locally using Dataset_to_Plate script and added masks using the gist above (thanks). Then exported plate and masks locally.
Opened a single image in napari and masks are displayed:
NB: This makes me think we should really change the default name of the labels group.
I noticed the README has omero zarr labels Image:1 --label-path=my_labels
instead of 'masks'.
Did we not decide to use the 'labels' terminology for all ome-zarr spec things now?
Also, doesn't --label-path=my_labels
break the ome-zarr spec, where labels are always stored under 'labels'?
omero zarr export Image:6001247
omero zarr masks Image:6001247 --label-path=my_labels
napari 6001247.zarr
The labels are not shown in napari
because ome-zarr-py
checks for labels under /labels
.
It works if you omit the --label-path
argument.
Did we not decide to use the 'labels' terminology for all ome-zarr spec things now?
"masks" is used when accessing OMERO (since there are no "labels"), so the CLI command was intended to be "masks".
Also, doesn't
--label-path=my_labels
break the ome-zarr spec, where labels are always stored under 'labels'?
Very likely. Does the -h
output not say that?
Ah, yes it does - But I always read the README not the -h
.
So I guess I don't understand why we offer that option to export it in a state that breaks the spec? If I want to break the spec, maybe I should just export it as valid 'labels', then rename the folder?
I can do the README fixes in another PR. We also need to add Plate
support to the README.
PR opened at https://github.com/ome/omero-cli-zarr/pull/46
Note: With the last commit #45 needs to be merged in order for this to work.
napari 101.zarr/A/1/0
:+1:(No labels are shown in the overall plate view)
I think this is good to merge from me.
Merging along with gh-45
Adds the functionality for exporting masks/labels for plates.
It exports the masks in a path structure like this:
For testing I used plate
plate1_1_013
on merge-ci (user-3), doesn't take too long to export (about 10-15 min the first time).Or create your own masks with a simple segmentation. I pasted a script together (based on idr0079 maks import script): https://gist.github.com/dominikl/0c65cc18d57b51c509e93e53c1c44bc6 .
Waiting for #43 to merged, will rebase then.