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

Merged
merged 11 commits into from
Jul 22, 2024

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.

@melonora
Copy link
Collaborator

@aeisenbarth Thanks again, sorry it took some time

@melonora melonora merged commit 2f4f425 into scverse:main Jul 22, 2024
5 of 6 checks passed
LucaMarconato added a commit that referenced this pull request Aug 19, 2024
LucaMarconato added a commit that referenced this pull request Aug 19, 2024
* fix #282 (error in channel selection due to #153)

* cleanup commented code

* fix test slider python 3.11
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.

2 participants