squidpy.im.ImageContainer.concat
- classmethod ImageContainer.concat(imgs, library_ids=None, combine_attrs='identical', **kwargs)[source]
Concatenate
imgs
in Z-dimension.All
imgs
need 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 (
Optional
[Sequence
[str
|None
]]) – Name for each image that will be associated to each Z-dimension. This should match thelibrary_id
in the correspondinganndata.AnnData
object. If None, the existing name of the Z-dimension is used for each image.combine_attrs (
str
) – How to combine attributes ofimgs
. By default, allimgs
need to have the same scale and crop attributes. Usecombine_attrs = 'override'
to relax this requirement. This might lead to a mismatch betweenImageContainer
andanndata.AnnData
coordinates.kwargs (
Any
) – Keyword arguments forxarray.concat()
.
- Return type:
- Returns:
: Concatenated
squidpy.img.ImageContainer
withimgs
stacks in Z-dimension.- Raises:
ValueError – If any of the
imgs
have more than 1 Z-dimension or iflibrary_ids
are not unique.