spatialdata-plot icon indicating copy to clipboard operation
spatialdata-plot copied to clipboard

Fix multi-channel handling

Open timtreis opened this issue 7 months ago • 4 comments

I think the current implementation doesn't correctly handle images with 3+ channels, for example resulting in the following warning when rendering a 5 channel image:

Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Got range [0.01870049980776624..2.4537485582468284]. image

This PR proposes an alternative in which PCA is used to reduce an arbitrary amount of channels to 3 so that we can treat them as RGB:

image

timtreis avatar Apr 22 '25 22:04 timtreis