fsbrain (version 0.0.2)

subject.surface: Load a surface for a subject.

Description

Load a brain surface for a subject.

Usage

subject.surface(subjects_dir, subject_id, surface, hemi)

Arguments

subjects_dir,

string. The FreeSurfer SUBJECTS_DIR, i.e., a directory containing the data for all your subjects, each in a subdir named after the subject identifier.

subject_id,

string. The subject identifier

surface,

string. The surface name. E.g., "white", or "pial". Used to construct the name of the surface file to be loaded.

hemi,

string, one of 'lh' or 'rh'. The hemisphere name. Used to construct the names of the surface file to be loaded.

Value

the surface, as returned by freesurferformats::read.fs.surface(). A named list containing entries 'vertices' and 'faces'.

Examples

Run this code
# NOT RUN {
   fsbrain::download_optional_data();
   subjects_dir = fsbrain::get_optional_data_filepath("subjects_dir");
   lh_white = subject.surface(subjects_dir, "subject1", "white", "lh");
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab