voyagerpy.spatial.get_geom#
- voyagerpy.spatial.get_geom(adata: AnnData, threshold: int | None = None, inplace: bool = False, res: str | None = None) AnnData#
Get the tissue polygons and tissue boundary from the sample image. If they don’t exist, they will be computed.
- Parameters:
adata (AnnData) – Annotated data matrix.
threshold (Optional[int], optional) – The threshold for computind the tissue segmentation, by default None
inplace (bool, optional) – If True, update the AnnData object inplace, otherwise return a copy, by default False
res (Optional[str], optional) – The resolution of the image to use for tissue segmentation. If None, determine the resolution automatically, by default None
- Returns:
The updated or copied AnnData object. The geometry dataframe will contain the columns “tissue_poly” and “tissue_boundary”, representing the polygon and its boundary for the tissue. The geometry dataframe is accessed at adata.uns[“spatial”][“geom”].
- Return type:
AnnData