squidpy.im.ImageContainer.uncrop

classmethod ImageContainer.uncrop(crops, shape=None)[source]

Re-assemble image from crops and their positions.

Fills remaining positions with zeros.

Parameters:
  • crops (list[ImageContainer]) – List of image crops.

  • shape (Optional[tuple[int, int]]) – Requested image shape as (height, width). If None, it is automatically determined from crops.

Return type:

ImageContainer

Returns:

: Re-assembled image from crops.

Raises:

ValueError – If crop metadata was not found or if the requested shape is smaller than required by crops.