Coverage for src/abm_initialization_collection/image/get_image_bounds.py: 100%
5 statements
« prev ^ index » next coverage.py v7.1.0, created at 2024-07-26 20:12 +0000
« prev ^ index » next coverage.py v7.1.0, created at 2024-07-26 20:12 +0000
1from bioio import BioImage
4def get_image_bounds(image: BioImage) -> tuple[int, int, int]:
5 """
6 Extracts image bounds in the x, y, and z directions.
8 Parameters
9 ----------
10 image
11 Image object.
13 Returns
14 -------
15 :
16 Tuple of image bounds.
17 """
19 _, _, z_shape, y_shape, x_shape = image.shape
20 bounds = (x_shape, y_shape, z_shape)
21 return bounds