lazyslide.tl.tile_shaper

Contents

lazyslide.tl.tile_shaper#

tile_shaper(wsi, groupby='domain', tile_key='tiles', key_added='domain_shapes')#

Return the domain shapes of the WSI by merging tiles with the same types that are spatially aggregated into polygons using geopandas dissolve.

Parameters:
wsiWSIData

The WSIData object.

groupbystr

The groupby key.

tile_keystr

The tile key.

key_addedstr

The key to add the shapes to.

Returns:
GeoDataFrame

Added to to the shapes slot of the WSIData object.

Examples

>>> import lazyslide as zs
>>> wsi = zs.datasets.sample()
>>> zs.tl.tile_shaper(wsi, groupby="domain")