View source: R/fsdir_abstraction_subject.R
subject.surface | R Documentation |
Load a brain surface mesh for a subject.
subject.surface(
subjects_dir,
subject_id,
surface = "white",
hemi = "both",
force_hemilist = FALSE,
as_tm = FALSE
)
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', 'rh', or 'both'. The hemisphere name. Used to construct the names of the surface file to be loaded. For 'both', see the information on the return value. |
force_hemilist |
logical, whether to return a hemilist even if the 'hemi' parameter is not set to 'both' |
as_tm |
logical, whether to return an |
the 'fs.surface' instance, as returned by read.fs.surface
. If parameter 'hemi' is set to 'both', a named list with entries 'lh' and 'rh' is returned, and the values of are the respective surfaces. The mesh data structure used in 'fs.surface' is a *face index set*.
Other surface mesh functions:
face.edges()
,
label.border()
,
mesh.vertex.included.faces()
,
mesh.vertex.neighbors()
,
vis.path.along.verts()
## Not run:
fsbrain::download_optional_data();
subjects_dir = fsbrain::get_optional_data_filepath("subjects_dir");
lh_white = subject.surface(subjects_dir, "subject1", "white", "lh");
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.