Learn R Programming

fsbrain (version 0.5.5)

geodesic.path: Compute geodesic path from a source vertex to one or more target vertices.

Description

Compute geodesic path from a source vertex to one or more target vertices.

Usage

geodesic.path(surface, source_vertex, target_vertices)

Value

list of integer vectors, the paths

Arguments

surface

an rgl::tmesh3d or freesurferformats::fs.surface instance. Can be a character string, which will be loaded as a surface file if it exists.

source_vertex

a scalar positive integer, the source vertex index in the mesh

target_vertices

single integer or vector of integers, the target vertices to which to compute the paths from the source_vertex.

Examples

Run this code
if (FALSE) {
  sjd = fsaverage.path(TRUE);
  surface = subject.surface(sjd, 'fsaverage3',
    surface = "white", hemi = "lh");
  p = geodesic.path(surface, 5, c(10, 20));
  vis.subject.morph.native(sjd, 'fsaverage3', 'thickness', views='si');
  vis.paths.along.verts(surface$vertices, p$paths, color=c("red", "yellow"));
}

Run the code above in your browser using DataLab