Conversion of 3 Channel Image

I am trying to convert a image with three channels from CZI to OME-TIFF. It looks like raw2bioformats with the --rgb flag blindly converts any image with three channels into a single channel rgb image. This gets to be a problem if you have multiple images in the CZI that mix multichannel and RGB (which could easily happen given that CZI includes RGB images for label and thumbnail). It would seem that you could figure out that this is wrong, because I think you know that you have three channels, but a single image plane, and hence it should be converted to RGB.

Am I interpreting what is going on correctly? Is there a uniform way I can convert my raw to OME tiff without having to look into the image files choose if I use the --rgb option or not and then totally punt on a file that happens to mix 3 channel and RGB?

Thanks,

Carl

Thanks for reporting this, @Carl_Kesselman. At the moment, bioformats2raw/raw2ometiff don’t have a way to make some output images RGB and some not - it’s all or nothing. The --rgb option was primarily intended for simple cases such as single images and brightfield whole slides.

Your best option for the moment is to not use the --rgb flag; that means that all channels will always be treated as separate planes. Depending on what software you are using to work with the output OME-TIFF, it may be possible to selectively treat some images as RGB instead of separate planes. If you can describe the workflow after conversion a bit, we may be able to offer some suggestions.

Any progress on changing this behavior will be added to the corresponding GitHub issue: https://github.com/glencoesoftware/raw2ometiff/issues/43