gauss_blur#

petpal.preproc.image_operations_4d.gauss_blur(input_image_path: str, blur_size_mm: float, out_image_path: str, verbose: bool, use_fwhm: bool = True)#

Blur an image with a 3D Gaussian kernal of a provided size in mm. Extracts Gaussian sigma from provided blur size, and voxel sizes in the image header. scipy.ndimage.gaussian_filter() is used to apply blurring. Uses wrapper around gauss_blur_computation().

Parameters:
  • input_image_path (str) – Path to 3D or 4D input image to be blurred.

  • blur_size_mm (float) – Sigma of the Gaussian kernal in mm.

  • out_image_path (str) – Path to save the blurred output image.

  • verbose (bool) – Set to True to output processing information.

  • use_FWHM (bool) – If True, blur_size_mm is interpreted as the FWHM of the Gaussian kernal, rather than the standard deviation.

Returns:

out_image (nibabel.nifti1.Nifti1Image) – Blurred image in nibabel format.