stitch_prediction
Prediction utility functions.
TilingMode #
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:
| Name | Type | Description | Default |
|---|---|---|---|
tiles | list of numpy.ndarray | Cropped tiles and their respective stitching coordinates. Can contain tiles from multiple images. | required |
tile_infos | list of TileInformation | List of information and coordinates obtained from | required |
Returns:
| Type | Description |
|---|---|
list of numpy.ndarray | Full image(s). |
Source code in src/careamics/prediction_utils/stitch_prediction.py
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:
| Name | Type | Description | Default |
|---|---|---|---|
tiles | list of numpy.ndarray | Cropped tiles and their respective stitching coordinates. | required |
tile_infos | list of TileInformation | List of information and coordinates obtained from | required |
Returns:
| Type | Description |
|---|---|
ndarray | Full image, with dimensions SC(Z)YX. |
Source code in src/careamics/prediction_utils/stitch_prediction.py
stitch_prediction_vae(predictions, dset) #
Stitch predictions back together using dataset's index manager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
predictions | ndarray | Array of predictions with shape (n_tiles, channels, height, width). | required |
dset | Dataset | Dataset object with idx_manager containing tiling information. | required |
Returns:
| Type | Description |
|---|---|
ndarray | Stitched array with shape matching the original data shape. |