brainstat.mesh.interpolate.surface_to_volume¶
-
brainstat.mesh.interpolate.
surface_to_volume
(pial_mesh, wm_mesh, labels, volume_template, volume_save, interpolation='nearest')[source]¶ Projects surface labels to the cortical ribbon.
- Parameters
pial_mesh (str, BSPolyData) – Filename of a pial mesh or a BSPolyData object of the same.
wm_mesh (str, BSPolyData) – Filename of a pial mesh or a BSPolyData object of the same.
labels (str, numpy.ndarray) – Filename of a .label.gii or .shape.gii file, or a numpy array containing the labels.
volume_template (str, nibabel.nifti1.Nifti1Image) – Filename of a nifti image in the same space as the mesh files or a NIfTI image loaded with nibabel.
volume_save (str) – Filename to which the label image will be saved.
interpolation (str) – Either ‘nearest’ for nearest neighbor interpolation, or ‘linear’ for trilinear interpolation, defaults to ‘nearest’.