ome / omero-ms-zarr

Experimental micro-service for implementing the Zarr spec over HTTP
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
17 stars 12 forks source link

Mask color array #65

Closed manics closed 4 years ago

manics commented 4 years ago

See https://github.com/ome/omero-ms-zarr/issues/62 Converts the label-color dict to an array or colours.

Also require the labels to be integers

See also an alternative in https://github.com/ome/omero-ms-zarr/pull/68

mtbc commented 4 years ago

Note that the microservice uses ROI IDs as pixel values for overlapping masks.

manics commented 4 years ago

I thought it was going to use a sentinal value e.g. -1 or max-int?

joshmoore commented 4 years ago

That's masks per ROI rather than two overlapping ROIs. To reduce the ambiguity, using the ROI ID everywhere might be safer (Rois and Masks could have the same ID).

manics commented 4 years ago

Using ROI-IDs instead of integer labels makes it easy for omero-ms-zarr and other utilities to export the mask from OMERO, but it means a user has to map each ROI-id to a label-index if they want a traditional label image.

mtbc commented 4 years ago

It would be easy to make that configurable. It would be possible to wholly prohibit offering ROI ID pixel values, I'd naively guess that the ROI→index lookup would be fast, but if their code is thinking in OMERO ROIs then of course they have to map the indices back to the ROIs.

manics commented 4 years ago

I've made a second proposal in

joshmoore commented 4 years ago

Closed in favor of https://github.com/ome/omero-ms-zarr/pull/71