Skip to content

Commit 3d25f23

Browse files
authored
Bugfix/render channels (#42)
* added test_get_bb_correct_inputs * added test_sdata_single_image_with_label fixture * test_get_bb_correct_inputs runs on several inputs and checks if labels are sliced as well * Added test_get_bb_wrong_input_types * added test to assert wrong input dims in pp.get_bb * added test to check for wront inputs with wrong length in pp.get_bb * additional tests for wrong input dims to assert that if start and end boundaries are the same an error is raised * small fix to make render_channels work again
1 parent 662b83f commit 3d25f23

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/spatialdata_plot/pl/basic.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ def show(
568568
"render_shapes",
569569
"render_labels",
570570
"render_points",
571+
"render_channels",
571572
]
572573

573574
if len(plotting_tree.keys()) > 0:
@@ -617,7 +618,7 @@ def show(
617618

618619
# transform all elements
619620
for cmd, _ in render_cmds.items():
620-
if cmd == "render_images":
621+
if cmd == "render_images" or cmd == "render_channels":
621622
for key in sdata.images.keys():
622623
img_transformation = get_transformation(sdata.images[key], get_all=True)
623624
img_transformation = list(img_transformation.values())[0]
@@ -640,7 +641,7 @@ def show(
640641
y_dims = []
641642

642643
for cmd, _ in render_cmds.items():
643-
if cmd == "render_images":
644+
if cmd == "render_images" or cmd == "render_channels":
644645
y_dims += [(0, x.shape[1]) for x in sdata.images.values()]
645646
x_dims += [(0, x.shape[2]) for x in sdata.images.values()]
646647

0 commit comments

Comments
 (0)