Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c1ac439
mvp
timtreis Apr 22, 2025
6d0b305
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 22, 2025
8ee3565
Merge branch 'main' into bugfix/issue450-feature-pca-aggregation-for-…
timtreis Apr 22, 2025
64b360d
added bg-senstive PCA
timtreis Apr 22, 2025
07d07db
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 22, 2025
0b7fec2
adjusted img render params
timtreis Apr 22, 2025
693de0f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 22, 2025
11aa663
fixed bg being excluded from PCA
timtreis Apr 22, 2025
62c8c1b
merge
timtreis Apr 22, 2025
9b733bb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 22, 2025
dc53d5e
covering more test cases2
timtreis May 11, 2025
c07baf5
fixed typecheck
timtreis May 11, 2025
a5fd498
updated tests
timtreis May 11, 2025
59f9d99
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 11, 2025
9383c62
updated tests
timtreis May 11, 2025
d5e412f
merge
timtreis May 11, 2025
65e03d7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 11, 2025
1d8b9e6
more test fixed
timtreis May 11, 2025
022640c
merge
timtreis May 11, 2025
8544579
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 11, 2025
2db28dc
more fixes
timtreis May 11, 2025
6775124
fixed bug
timtreis May 11, 2025
7806448
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 11, 2025
f73c8e2
bugfix
timtreis May 11, 2025
3e73648
merge
timtreis May 11, 2025
7712eb2
bugfix
timtreis May 11, 2025
4af92f5
changed default from PCA to stack
timtreis May 11, 2025
ccc4954
bugfix
timtreis May 11, 2025
5a8a711
fade into transparent now
timtreis May 11, 2025
de09ddc
test
timtreis May 11, 2025
0d14846
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 11, 2025
8de5bbe
revert
timtreis May 11, 2025
e81d776
merge
timtreis May 11, 2025
9a0e241
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 11, 2025
99bc6f5
revert
timtreis May 11, 2025
f67ecd4
merge
timtreis May 11, 2025
2e991c5
fixed img
timtreis May 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bugfix
  • Loading branch information
timtreis committed May 11, 2025
commit f73c8e2ac2e338a031ceedc7eea27455fc281323
2 changes: 1 addition & 1 deletion src/spatialdata_plot/pl/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ def _render_images(

# For each channel: map to RGBA, apply constant alpha, then add
for idx, ch in enumerate(channels):
layer_arr = layers[ch]
layer_arr = layers[idx]
rgba = channel_cmaps[idx](layer_arr)
rgba[..., 3] = render_params.alpha
comp_rgb += rgba[..., :3] * rgba[..., 3][..., None]
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions tests/pl/test_render_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ def test_plot_can_handle_multiple_cmaps(self, sdata_blobs: SpatialData):
).pl.show()


def test_fails_with_palette_and_multiple_cmaps(self, sdata_blobs: SpatialData):
"""Test error case: Cannot provide both palette and multiple cmaps"""
def test_fails_with_palette_and_multiple_cmaps(sdata_blobs: SpatialData):
with pytest.raises(ValueError, match="If 'palette' is provided"):
sdata_blobs.pl.render_images(
element="blobs_image",
Expand Down Expand Up @@ -212,5 +211,5 @@ def test_fail_invalid_multichannel_strategy(sdata_multichannel):


def test_fail_channel_index_out_of_range(sdata_blobs):
with pytest.raises(ValueError, match="Invalid channel(s): 10. Valid choices are: [0, 1, 2]"):
with pytest.raises(ValueError, match="Invalid channel"):
sdata_blobs.pl.render_images(element="blobs_image", channel=10).pl.show()