stlearn.add.add_mask¶
-
stlearn.add.add_mask(adata: anndata._core.anndata.AnnData, imgpath: Union[pathlib.Path, str], key: str = 'mask', copy: bool = False) → Optional[anndata._core.anndata.AnnData][source]¶ Adding binary mask image to the Anndata object
- Parameters
adata – Anndata object.
imgpath – Image mask path.
key – Label for mask.
copy – Return a copy instead of writing to adata.
- Returns
Depending on copy, returns or updates adata with the following fields.
**mask_image** (adata.uns field) – Array format of image, saving by Pillow package.