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:
- wsi
WSIData The WSIData object.
- groupbystr
The groupby key.
- tile_keystr
The tile key.
- key_addedstr
The key to add the shapes to.
- wsi
- Returns:
GeoDataFrameAdded 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")