Coverage for src/abm_initialization_collection/image/get_image_bounds.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.1.0, created at 2024-09-25 19:25 +0000

1from bioio import BioImage 

2 

3 

4def get_image_bounds(image: BioImage) -> tuple[int, int, int]: 

5 """ 

6 Extract image bounds in the x, y, and z directions. 

7 

8 Parameters 

9 ---------- 

10 image 

11 Image object. 

12 

13 Returns 

14 ------- 

15 : 

16 Tuple of image bounds. 

17 """ 

18 

19 _, _, z_shape, y_shape, x_shape = image.shape 

20 return (x_shape, y_shape, z_shape)