stlearn.pp.tiling¶
-
stlearn.pp.tiling(adata: anndata._core.anndata.AnnData, out_path: Union[pathlib.Path, str] = './tiling', library_id: str = None, crop_size: int = 40, target_size: int = 299, verbose: bool = False, copy: bool = False) → Optional[anndata._core.anndata.AnnData][source]¶ Tiling H&E images to small tiles based on spot spatial location
- Parameters
adata – Annotated data matrix.
out_path – Path to save spot image tiles
library_id – Library id stored in AnnData.
crop_size – Size of tiles
verbose – Verbose output
copy – Return a copy instead of writing to adata.
target_size – Input size for convolutional neuron network
- Returns
Depending on copy, returns or updates adata with the following fields.
**tile_path** (adata.obs field) – Saved path for each spot image tiles