spatialdata-plot
spatialdata-plot copied to clipboard
Fix multi-channel handling
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].
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: