mobie / mobie.github.io

1 stars 3 forks source link

Enable loading labels from ome.zarr in mobie #90

Closed constantinpape closed 1 year ago

constantinpape commented 1 year ago

Currently, we don't have a way to open labels that are stored in the labels/ subfolder of an ome.zarr folder in MoBIE. (Note that they can be opened by mobie.io, and once we have merged https://github.com/mobie/mobie-io/pull/121 this will also fix a bug with it and work better). It would be good if we can specify in the spec (and then load in the viewer) that a label image should be loaded. I would suggest to handle this similar to the channel field (https://github.com/mobie/mobie-io/pull/121) and add a new optional field labels to ome.zarr in the spec, that gives the name of the labels group that should be loaded. E.g. if we have an ome.zarr with labels/cells, it could be specified with the field labels: cells.

What do you think @tischi? (I would eventually need this to add all the data in the full spatial transcriptomics example I have started to work on.)

tischi commented 1 year ago

Would it also work to give a full path to the labels sub-folder for being opened? I think it should? I would prefer this over adding some extra logic for the label subfolder.

constantinpape commented 1 year ago

Would it also work to give a full path to the labels sub-folder for being opened? I think it should? I would prefer this over adding some extra logic for the label subfolder.

That's a good point. I will give it a try.

constantinpape commented 1 year ago

Yep, this works, no need to add anything extra to the spec.