convert_surface: Convert Freesurfer Surface

View source: R/convert_surface.R

convert_surfaceR Documentation

Convert Freesurfer Surface

Description

Reads in a surface file from Freesurfer and separates into vertices and faces

Usage

convert_surface(infile, ...)

Arguments

infile

Input surface file

...

additional arguments to pass to mris_convert

Value

List of 3 elements: a header indicating the number of vertices and faces, the vertices, and the faces

Note

This was adapted from the gist: https://gist.github.com/mm–/4a4fc7badacfad874102

Examples

if (have_fs()) {
infile = file.path(fs_subj_dir(), 
                   "bert", "surf", "rh.pial")
res = convert_surface(infile = infile)
}

muschellij2/freesurfer documentation built on Nov. 28, 2023, 4:45 a.m.