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(default:None) Name for each image that will be associated to each Z-dimension. This should match the
library_idin the correspondinganndata.AnnDataobject. If None, the existing name of the Z-dimension is used for each image.- combine_attrs
str(default:'identical') How to combine attributes of
imgs. 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 for
xarray.concat().
- imgs
- Returns:
ImageContainer– Concatenatedsquidpy.im.ImageContainerwithimgsstacks in Z-dimension.- Raises:
ValueError – If any of the
imgshave more than 1 Z-dimension or iflibrary_idsare not unique.