validate_two_images_same_dimensions#
- petpal.utils.image_io.validate_two_images_same_dimensions(image_1: nibabel.nifti1.Nifti1Image, image_2: nibabel.nifti1.Nifti1Image, check_4d: bool = False)#
Check the dimensions of two Nifti1Image objects and verify they have the same shape.
- Parameters:
image_1 (nibabel.nifti1.Nifti1Image) – The first image of the two to check image size.
image_2 (nibabel.nifti1.Nifti1Image) – The second image of the two to check image size.
check_4d (bool) – If true, checks all dimensions including validating the number of frames. If false, only checks first three dimensions. Default False.
- Raises:
ValueError – If images do not have the same dimensions.