lyman.signals.smooth_volume

lyman.signals.smooth_volume(data_img, fwhm, mask_img=None, noise_img=None, inplace=False)[source]

Filter volume data with an isotropic gaussian kernel.

Smoothing can be constrained to occur within the voxels defined within mask_img and optionally can ignore/interpolate out the voxels identified within noise_img.

Parameters
data_imgnibabel image

3D or 4D image data.

fwhmpositive float or None

Size of isotropic smoothing kernel, in mm, or None to return input (as float and possibly copied).

mask_imgnibabel image

3D binary image defining smoothing range.

noise_imgnibabel image

3D binary image defining voxels to be interpolated out.

inplacebool

If True, overwrite data in data_img. Otherwise perform a copy.

Returns
smooth_datanibabel image

Image like data_img but after smoothing.