Draft
Conversation
for more information, see https://pre-commit.ci
…n-4-channels-in-render_images
Member
Author
|
@Sonja-Stockhaus did we discuss this at one point? I've been ignoring that warning for a long time because it's thrown my matplotlib and doesn't fail |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Member
Author
Collaborator
Nope. I also don't remember ever trying to render sth with 3+ channels |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #451 +/- ##
==========================================
+ Coverage 84.92% 85.71% +0.79%
==========================================
Files 8 8
Lines 1784 1869 +85
==========================================
+ Hits 1515 1602 +87
+ Misses 269 267 -2
🚀 New features to boost your workflow:
|
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Sonja-Stockhaus
pushed a commit
that referenced
this pull request
Jun 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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: