bento.tl.opening¶
- bento.tl.opening(sdata, shape_key, proportion, recompute=False) None¶
Compute morphological opening of each shape.
The opening operation erodes the shape by distance d and then dilates by d, where d = proportion * shape radius.
- Parameters:
sdata (SpatialData) – Input SpatialData object
shape_key (str) – Key in sdata.shapes containing shape geometries
proportion (float) – Fraction of shape radius to use as opening distance
recompute (bool, default False) – Whether to force recomputation if feature exists
- Returns:
Updates sdata.shapes[shape_key] with: - ‘{shape_key}_open_{proportion}_shape’: Opened shape geometries
- Return type:
None