fishtank.seg.fix_overlaps

Contents

fishtank.seg.fix_overlaps#

fishtank.seg.fix_overlaps(polygons, min_ioa=0.2, cell='cell', z='global_z', fov='fov', tile_shape=(500, 500), tolerance=0.5, diameter=20)#

Fix overlapping polygons from adjacent FOVs.

Parameters:
  • polygons (GeoDataFrame) – a GeoDataFrame of cell outlines.

  • min_ioa (float (default: 0.2)) – the minimum intersection over area to merge overlapping polygons.

  • cell (str (default: 'cell')) – the name of the cell column in the GeoDataFrame.

  • z (str | None (default: 'global_z')) – the name of the z column in the GeoDataFrame. If None, the polygons are assumed to be 2D.

  • fov (str (default: 'fov')) – the name of the fov column in the GeoDataFrame.

  • tile_shape (tuple (default: (500, 500))) – the shape of the tiles to divide the polygons into for parallel processing.

  • tolerance (float (default: 0.5)) – the tolerance for simplifying the polygons.

  • diameter (float (default: 20)) – Approximate diameter of the polygons.

Return type:

GeoDataFrame

Returns:

polygons a GeoDataFrame of cell outlines.