lyman.signals.smooth_segmentation

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

Filter each compartment of a segmentation with an isotropic gaussian.

Parameters
data_imgnibabel image

3D or 4D image data.

seg_imgnibabel image

3D label image defining smoothing ranges.

fwhmpositive float or None

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

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.