squidpy.im.ImageContainer.from_adata
- classmethod ImageContainer.from_adata(adata, img_key=None, library_id=None, spatial_key='spatial', **kwargs)[source]
Load an image from
anndata
object.- Parameters:
adata (
AnnData
) – Annotated data object.img_key (
Optional
[str
]) – Key inanndata.AnnData.uns
['{spatial_key}']['{library_id}']['images']
. If None, the first key found is used.library_id (
Union
[str
,Sequence
[str
],None
]) – Key inanndata.AnnData.uns
['{spatial_key}']
specifying which library to access.spatial_key (
str
) – Key inanndata.AnnData.uns
where spatial metadata is stored.kwargs (
Any
) – Keyword arguments forsquidpy.im.ImageContainer
.
- Return type:
- Returns:
: The image container.