Learn R Programming

fsbrain (version 0.5.5)

geod.patches.pervertexdata: Generate per-vertex distance data from geodesic patches around several vertices.

Description

Works across hemispheres (for a whole brain) if you pass a hemilist of meshes as parameter 'mesh', see below.

Usage

geod.patches.pervertexdata(mesh, vertex, ...)

Value

vector of doubles (or a hemilist of 2 such vectors if 'mesh' is a hemilist), the per-vertex distance data. Data for vertices outside neighborhoods will be NA.

Arguments

mesh

a single fs.surface instance, or a hemilist of two such meshes. If a hemilist, the vertex indices can go from 1 to the sum of vertices in both meshes, and the proper hemisphere will be used automatically.

vertex

positive integer (or vector of the latter), the index of the source vertex in the mesh. If a vector, the neighborhoods for all vertices will be computed separately.

...

extra arguments passed to geod.vert.neighborhood.

Examples

Run this code
if (FALSE) {
  sjd = fsaverage.path(TRUE);
  surfaces = subject.surface(sjd, 'fsaverage',
    surface = "white", hemi = "both");
  res = geod.patches.pervertexdata(surfaces,
    vertex = c(12345L, 45L),
    max_distance = 25.0);
  # res$lh and res$rh now hold the per-vertex data.
}

Run the code above in your browser using DataLab