Learn R Programming

fsbrain (version 0.4.2)

vis.path.along.verts: Draw a 3D line from vertex to vertex

Description

To get a nice path along the surface, pass the vertex indices along a geodesic path. Note: You can first open an interactive brain view (`view='si'`) with a vis* function like vis.subject.morph.native, then run this function to draw into the active plot.

Usage

vis.path.along.verts(
  surface_vertices,
  path_vertex_indices = seq(1L, nrow(surface_vertices)),
  do_vis = TRUE
)

Arguments

surface_vertices

float matrix of size (n, 3), the surface vertex coordinates, as returned as part of subject.surface or read.fs.surface, in the member "vertices".

path_vertex_indices

vector of vertex indices, the path. You will need to have it computed already. (This function does **not** compute geodesic paths. You can use it to visualize such a path though.) If omitted, the vertex coordinates will be traversed in their given order to create the path.

do_vis

logical, whether to actually draw the path.

Value

n x 3 matrix, the coordinates of the path, with appropriate ones duplicated for rgl pair-wise segments3d rendering.

See Also

vis.paths if you need to draw many paths.

Other surface mesh functions: face.edges(), label.border(), mesh.vertex.included.faces(), mesh.vertex.neighbors(), subject.surface()