Skip to content

Stitch Prediction

Source

Prediction utility functions.

stitch_prediction(tiles, tile_infos)

Stitch tiles back together to form a full image(s).

Tiles are of dimensions SC(Z)YX, where C is the number of channels and can be a singleton dimension.

Parameters:

  • tiles (list of numpy.ndarray) –

    Cropped tiles and their respective stitching coordinates. Can contain tiles from multiple images.

  • tile_infos (list of TileInformation) –

    List of information and coordinates obtained from dataset.tiled_patching.extract_tiles.

Returns:

  • list of numpy.ndarray

    Full image(s).

stitch_prediction_single(tiles, tile_infos)

Stitch tiles back together to form a full image.

Tiles are of dimensions SC(Z)YX, where C is the number of channels and can be a singleton dimension.

Parameters:

  • tiles (list of numpy.ndarray) –

    Cropped tiles and their respective stitching coordinates.

  • tile_infos (list of TileInformation) –

    List of information and coordinates obtained from dataset.tiled_patching.extract_tiles.

Returns:

  • ndarray

    Full image, with dimensions SC(Z)YX.