This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.
- nilearn.image.smooth_img(imgs, fwhm)#
Smooth images by applying a Gaussian filter.
Apply a Gaussian filter along the three first dimensions of arr. In all cases, non-finite values in input image are replaced by zeros.
- imgsNiimg-like object or iterable of Niimg-like objects
Image(s) to smooth (see Input and output: neuroimaging data representation for a detailed description of the valid input types).
list,or ‘fast’ or None, optional
Smoothing strength, as a full-width at half maximum, in millimeters:
If a nonzero scalar is given, width is identical in all 3 directions.
If fwhm=”fast”, a fast smoothing will be performed with a filter [0.2, 1, 0.2] in each direction and a normalisation to preserve the local average value.
If fwhm is None, no filtering is performed (useful when just removal of non-finite values is needed).
In corner case situations, fwhm is simply kept to None when fwhm is specified as fwhm=0.
nibabel.nifti1.Nifti1Imageor list of
Filtered input image. If imgs is an iterable, then filtered_img is a list.