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

Change RGB detection to be based on channel names #153

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

aeisenbarth
Copy link
Contributor

@aeisenbarth aeisenbarth commented Aug 24, 2023

See #150

To give users more control over whether a 3/4-channel image is interpreted and visualized as RGB, channel names now need to be explicitly set to ["r", "g", "b"]. Therefore, to_spatial_image would have a new argument rgb=True to override the channel names (or auto-detect with rgb=None).

@aeisenbarth
Copy link
Contributor Author

Since the condition {"r", "g", "b"} <= set(c_coords) does not require a specific order of c_coords, I should also reorder them to RGB, since that is what Napari will use. Does anyone know the corresponding xarray function (analog to transposing dimensions)?

@aeisenbarth
Copy link
Contributor Author

Tests fail because multiscales blobs are not correctly set up with provided channel names. scverse/spatialdata#342 would need to be merged first.

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

Successfully merging this pull request may close these issues.

None yet

2 participants