ImageContainer.subset

ImageContainer.subset#

ImageContainer.subset(adata, spatial_key='spatial', copy=False)[source]#

Subset anndata.AnnData using this container.

Useful when this container is a crop of the original image.

Parameters:
adata AnnData

Annotated data object.

spatial_key str (default: 'spatial')

Key in anndata.AnnData.obsm where spatial coordinates are stored.

copy bool (default: False)

Whether to return a copy of adata.

Returns:

AnnData – Subset of anndata.AnnData.