squidpy.experimental.tl.StitchParams

class squidpy.experimental.tl.StitchParams(distance_tol=0.75, min_edge_length=5.0, min_edge_length_ratio=0.4, min_edge_coverage=0.5, candidate_min_iou=0.2, close_radius=3)[source]

Advanced tuning knobs for assign_stitch_groups().

Defaults work for typical 2D segmentation tiles produced by cellpose-like pipelines. Pass an instance (or a Mapping of field names to values) as stitch_params to override. These are advanced knobs – the defaults rarely need changing.

Methods

Attributes

distance_tol

Sub-pixel tolerance for "lies on a bbox edge".

min_edge_length

Absolute floor on cut-edge length (pixels).

min_edge_length_ratio

Minimum cut-edge length relative to the cell's equivalent diameter.

min_edge_coverage

Minimum fraction of parallel-axis positions covered by near-edge contour points.

candidate_min_iou

Loose 1-D IoU floor at candidate enumeration.

close_radius

Morphological closing disk radius for the union mask.