pyXenium.contour.expand_contours#

expand_contours(sdata, *, contour_key, distance, mode='overlap', output_key=None, copy=False, voronoi_sample_step=None)#

Expand an existing contour layer into a derived contour layer.

Parameters#

sdata

Input XeniumSlide container.

contour_key

Source contour key inside sdata.shapes.

distance

Positive outward expansion distance in the contour coordinate units.

mode

Either "overlap" for ordinary buffering or "voronoi" for mutually-exclusive Voronoi partitioning over the buffered support.

output_key

Target contour key. Defaults to f"{contour_key}_expanded".

copy

When True, return a copied XeniumSlide. Otherwise mutate sdata in place.

voronoi_sample_step

Maximum segment length used to sample boundary seed points in Voronoi mode.

Parameters:
Return type:

XeniumSlide | None