glencoesoftware/bioformats2raw

Color metadata & single-channel use case

Closed this issue · 0 comments

#160 introduced the population of the omero metadata specification by this conversion tool.

The new logic populates the mininum/maximum values per channel but also stores some channel metadata like the color. The relevant portion of the code is largely inherited from omero-blitz ChannelProcessor to try to set a meaningful value based on various metadata fields and invoked in

Color color = Colors.getColor(omexml, seriesIndex, c);

While testing different conversion workflows, I noticed one particular deviation in the case of single-channel image. This can be tested by

% bioformats2raw test.fake test.zarr
% grep color test.zarr/0/.zattrs 
      "color" : "FF0000",

In the case of single-channel data, the OMERO importer calls a separate setSingleChannel method which sets the color to grey instead.

https://github.com/ome/omero-blitz/blob/5d27e4771af5c4c457464090edb5b450d1c11e1d/src/main/java/ome/formats/model/ChannelProcessor.java#L106-L119

Should bioformats2raw be updated to adopt the same behavior?