-
Notifications
You must be signed in to change notification settings - Fork 27
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
Set rgb argument to auto-detect whether image channels are RGB #78
Conversation
Update: |
Thanks for the PR, merging soon! Btw, I have implemented a more general approach so that users don't have to pass |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #78 +/- ##
==========================================
+ Coverage 35.91% 45.82% +9.90%
==========================================
Files 19 22 +3
Lines 1715 2132 +417
==========================================
+ Hits 616 977 +361
- Misses 1099 1155 +56
|
In |
Following issue scverse/napari-spatialdata#150, the logic to decide whether channels should be visualized as RGB has been moved from the viewer
napari-spatialdata
to the parser in spatial-image, which in the case of RGB sets channel names to["r", "g", "b"]
. The default behavior ofto_spatial_image
isrgb=False
(no change of channel names). That means in order to have the auto-detection as it was in the viewer, we now need to opt-in in the readers, either to auto-detect RGB (rgb=None
) or explicitly enforce RGB (rgb=True
).This PR modifies readers to opt in for RGB detection, or explicitly set RGB (where the original data-format is known to always be RGB(A) with 3 or 4 channels).