squidpy.im.ImageContainer.concat
- classmethod ImageContainer.concat(imgs, library_ids=None, combine_attrs='identical', **kwargs)[source]
Concatenate
imgsin Z-dimension.All
imgsneed to have the same shape and the same name to be concatenated.- Parameters:
imgs (
Iterable[ImageContainer]) – Images that should be concatenated in Z-dimension.library_ids (
Sequence[str|None] |None) – Name for each image that will be associated to each Z-dimension. This should match thelibrary_idin the correspondinganndata.AnnDataobject. If None, the existing name of the Z-dimension is used for each image.combine_attrs (
str) – How to combine attributes ofimgs. By default, allimgsneed to have the same scale and crop attributes. Usecombine_attrs = 'override'to relax this requirement. This might lead to a mismatch betweenImageContainerandanndata.AnnDatacoordinates.kwargs (
Any) – Keyword arguments forxarray.concat().
- Return type:
- Returns:
Concatenated
squidpy.im.ImageContainerwithimgsstacks in Z-dimension.- Raises:
ValueError – If any of the
imgshave more than 1 Z-dimension or iflibrary_idsare not unique.