stitch_prediction
Tiled prediction stitching utilities.
group_tiles_by_key(tiles, key) #
Sort tiles by key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tiles | list of ImageRegionData | List of tiles to sort. | required |
key | (data_idx, sample_idx) | Key to group tiles by. | 'data_idx' |
Returns:
| Type | Description |
|---|---|
{int: list of ImageRegionData} | Dictionary mapping data indices to lists of tiles. |
Source code in src/careamics/lightning/dataset_ng/prediction/stitch_prediction.py
stitch_prediction(tiles) #
Stitch tiles back together to form full images.
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 ImageRegionData | Cropped tiles and their respective stitching coordinates. Can contain tiles from multiple images. | required |
Returns:
| Type | Description |
|---|---|
list of numpy.ndarray | Full images, may be a single image. |
Source code in src/careamics/lightning/dataset_ng/prediction/stitch_prediction.py
stitch_single_prediction(tiles) #
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 ImageRegionData | Cropped tiles and their respective stitching coordinates. | required |
Returns:
| Type | Description |
|---|---|
ndarray | Full image, with dimensions SC(Z)YX. |
Source code in src/careamics/lightning/dataset_ng/prediction/stitch_prediction.py
stitch_single_sample(tiles) #
Stitch tiles back together to form a full sample.
Tiles are of dimensions C(Z)YX, where C is the number of channels and can be a singleton dimension.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tiles | list of ImageRegionData | Cropped tiles and their respective stitching coordinates. | required |
Returns:
| Type | Description |
|---|---|
ndarray | Full sample, with dimensions C(Z)YX. |