brainstat.context.utils.mutli_surface_to_volume¶
- brainstat.context.utils.mutli_surface_to_volume(pial, white, volume_template, labels, output_file, interpolation='nearest', verbose=True)[source]¶
Interpolates multiple surfaces to the volume.
- Parameters
pial (str, BSPolyData, list) – Path of a pial surface file, BSPolyData of a pial surface or a list containing multiple of the aforementioned.
white (str, BSPolyData, list) – Path of a white matter surface file, BSPolyData of a pial surface or a list containing multiple of the aforementioned.
labels (str, numpy.ndarray, list) – Path to a label file for the surfaces, numpy array containing the labels, or a list containing multiple of the aforementioned.
output_file (str) – Path to the output file, must end in .nii or .nii.gz.
volume_template (str, nibabel.nifti1.Nifti1Image) – Path to a nifti file to use as a template for the surface to volume procedure, or a loaded NIfTI image.
interpolation (str) – Either ‘nearest’ for nearest neighbor interpolation, or ‘linear’ for trilinear interpolation, defaults to ‘nearest’.
verbose (boolean) – If true, returns verbose output to console, defaults to true.
Notes
An equal number of pial/white surfaces and labels must be provided. If parcellations overlap across surfaces, then the labels are kept for the first provided surface.