lyman.signals.smooth_surface

lyman.signals.smooth_surface(data_img, vert_img, fwhm, subject, surf='graymid', noise_img=None, inplace=False, subjects_dir=None)[source]

Smooth cortical voxels with Gaussian weighted surface distances.

Parameters
data_imgnibabel image

3D or 4D input data.

vert_img4D nibabel image

Image where voxels have their corresponding surfave vertex ID or are -1 if they do not correspond to cortex. The first frame should have left hemisphere vertices and the second right hemisphere vertices.

fwhmpositive float or None

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

subjectstring

Subject ID to locate data in data directory.

surfstring

Name of the surface defining the mesh geometry.

noise_imgnibabel image

Binary image defining voxels that should be interpolated out.

inplace :bool

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

subjects_dirstring

Path to the Freesurfer data directory root; if absent, get from the SUBJECTS_DIR environment variable.

Returns
smooth_imgnibabel image

Image like data_img but after smoothing.