Closed sbesson closed 1 year ago
I think this generally makes sense. Two thoughts:
EmissionWavelength
, ExcitationWavelength
, LightSource
, and Filter
metadata under Channel
be removed as well?The last commits should remove any channel metadata that could be used as the source of truth for setting the color as defined in https://github.com/ome/omero-blitz/blob/c4e4d2bbd3ac6d5cdc14621fb89fb97187eca22e/src/main/java/ome/formats/model/ChannelProcessor.java#L129. The channel name is also removed.
All of the above could be made configurable via some command-line options if deemed valuable.
Merging as discussed during today's PR review meeting.
Primarily driven by the discussion at https://forum.image.sc/t/nikon-slide-scanner-brightfield-nd2-files-lacking-rgb-information-after-conversion-to-ome-tif-when-viewed-in-omero/76438
The scenario can be reproduced by using a file similar to
and either running NGFF-Converter 1.1.4 with the
--rgb
flag in the arguments list or directly:The generated OME-TIFF is a RGB image (SizeC=3, 1 channel with SamplePerPixels=3) as expected but its Channel metadata still contains the green color information
When importing such a file into OMERO, all channels are now populated as green by default. This is at odds with the user expectation when passing a
--rgb
flag.dcb6642852e3949fbb2a1c58ab7958bfffd8c652 expands the RGB conversion tests to covert the scenario above and add channel metadata assertions 2cfbd1ec71c0ac82706608a9befbbc3b3b0885d2 proposes to change the behavior of the converter to remove the Channel.Color metadata when
--rgb
is passed and adjusts the newly introduced unit test accordingly/cc @DavidStirling