Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RGB support #215

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

melissalinkert
Copy link
Member

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, glencoesoftware/isyntax2raw#29, and glencoesoftware/raw2ometiff#26 may be related.

Only simple downsapmling implemented, OpenCV types will throw an exception.
@perlman
Copy link
Contributor

perlman commented Dec 7, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Inbox
Development

Successfully merging this pull request may close these issues.

2 participants