You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Images with alpha channel being plotted incorrectly #406
Hey! I've come across an issue when trying to plot some images where one of the channels is an alpha level. This is a visium image that was submitted to cellxgene.
Thanks for reporting. This is how rgba is dealt with in napari-spatialdata, the issue may be related: https://github.com/scverse/napari-spatialdata/pull/153/files; following the napari-spatialdata approach, the desired implementation may be the following:
if r, g, b (a) are the channel names of the image, then interpret it as RGB(A)
(optional) if not, let the user pass an explicit parameter to pl.render_images(), such as rgb=True (default false)
In napari-spatialdata, this approach replaced the previous method, which was based on a heuristic (checking if the channels were 3 or 4 and interpreting the image as RGB(A)).
Activity
LucaMarconato commentedon Jan 20, 2025
Thanks for reporting. This is how rgba is dealt with in napari-spatialdata, the issue may be related: https://github.com/scverse/napari-spatialdata/pull/153/files; following the napari-spatialdata approach, the desired implementation may be the following:
r,g,b(a) are the channel names of the image, then interpret it as RGB(A)pl.render_images(), such asrgb=True(defaultfalse)In napari-spatialdata, this approach replaced the previous method, which was based on a heuristic (checking if the channels were 3 or 4 and interpreting the image as RGB(A)).
@timtreis @Sonja-Stockhaus wdyt?
Fix RGBA images being rendered with categorical coloring instead of p…