stlearn.add.image¶
-
stlearn.add.image(adata: anndata._core.anndata.AnnData, imgpath: Union[pathlib.Path, str], library_id: str, quality: str = 'hires', scale: float = 1.0, visium: bool = False, copy: bool = False) → Optional[anndata._core.anndata.AnnData][source]¶ Adding image data to the Anndata object
- Parameters
adata – Annotated data matrix.
imgpath – Image path.
library_id – Identifier for the visium library. Can be modified when concatenating multiple adata objects.
scale – Set scale factor.
quality – Set quality that convert to stlearn to use. Store in anndata.obs[‘imagecol’ & ‘imagerow’].
visium – Is this anndata read from Visium platform or not.
copy – Return a copy instead of writing to adata.
- Returns
Depending on copy, returns or updates adata with the following fields.
**tissue_img** (adata.uns field) – Array format of image, saving by Pillow package.