Skip to content

Commit d2618e7

Browse files
authored
Fix labels boundaries (#281)
* implement label fix * fix label boundaries
1 parent 5339d39 commit d2618e7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/spatialdata_plot/pl/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,8 @@ def _map_color_seg(
775775
)
776776

777777
if seg_boundaries:
778+
if seg.shape[0] == 1:
779+
seg = np.squeeze(seg, axis=0)
778780
seg_bound: ArrayLike = np.clip(seg_im - find_boundaries(seg)[:, :, None], 0, 1)
779781
return np.dstack((seg_bound, np.where(val_im > 0, 1, 0))) # add transparency here
780782

0 commit comments

Comments
 (0)