bioformats2raw icon indicating copy to clipboard operation
bioformats2raw copied to clipboard

RGB support

Open melissalinkert opened this issue 2 years ago • 1 comments

Adds a --keep-rgb option, which omits ChannelSeparator from the reader stack and will return RGB planes if that's what is stored in the input data. The reader's isInterleaved() is used in this case to determine the axis order; isInterleaved() == true means that the order will by *YXC. We may want to think about either forcing interleaved across the board if --keep-rgb is used, or adding a sub-option to do that.

The case where there are multiple channels each consisting of an RGB plane is not supported with --keep-rgb. Same for downsampling types that require OpenCV. We could probably add both, just keeping it simpler for now.

DimensionOrder in METADATA.ome.xml is not altered, so that comes directly from the underlying reader. With --keep-rgb and input RGB data, I'd expect SamplesPerPixel on each Channel to be greater than 1.

This is barely tested and has no unit tests yet. Just opening this as a draft now in case I run out of time to do more this week.

Discussed earlier today with @sbesson, cc @kkoz, @muhanadz

#180, https://github.com/glencoesoftware/isyntax2raw/pull/29, and https://github.com/glencoesoftware/raw2ometiff/issues/26 may be related.

melissalinkert avatar Aug 29 '23 23:08 melissalinkert

I think we (with my JAX hat) would find this useful! We have a lot of RGB image data, and having an easy mechanism for the channels to be stored in the same chunk would certainly speed up visualization.

perlman avatar Dec 07 '23 14:12 perlman