Learn R Programming

fsbrain (version 0.5.3)

subject.descriptor.geodesic.average.distance: Compute mean geodesic distance descriptor for a subject.

Description

For all vertices: compute the mean pseudo-geodesic distance from this vertex to all others in the same hemisphere. Computes |V|^2 geodesic distances.

Usage

subject.descriptor.geodesic.average.distance(
  subjects_dir,
  subject_id,
  surface = "white",
  hemi = "both",
  ...
)

Value

a hemilist containing vectors with the descriptor data for the requested hemisphere(s). The length of the vectors is the number of vertices in the surface, and the value for a vertex is the mean geodesic distance to all other vertices for this vertex.

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 display surface. E.g., "white", "pial", or "inflated". Defaults to "white".

hemi

string, one of 'lh', 'rh', or 'both'. The hemisphere name. Used to construct the names of the label data files to be loaded.

...

extra parameters passed on to geodesic.average.distance. Ignored if 'cortex_only' is TRUE.

Examples

Run this code
if (FALSE) {
  download_fsaverage3(TRUE);
  sjd = fsaverage.path();
  dist = subject.descriptor.geodesic.average.distance(sjd,
    "fsaverage3", surface = "white", hemi = "both");
  vis.data.on.subject(sjd, "fsaverage3", morph_data_lh = dist$lh);
}

Run the code above in your browser using DataLab