vis.path.along.verts | R Documentation |
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 (‘views=’si'') with a vis* function like vis.subject.morph.native
, then run this function to draw into the active plot.
vis.path.along.verts(
surface_vertices,
path_vertex_indices = NULL,
do_vis = TRUE,
color = "#FF0000",
no_material = FALSE
)
surface_vertices |
float matrix of size (n, 3), the surface vertex coordinates, as returned as part of |
path_vertex_indices |
vector of vertex indices, the path. You will need to have it computed already. (This function does **not** compute geodesic paths, see |
do_vis |
logical, whether to actually draw the path. |
color |
a color string, like '#FF0000' to color the path. |
no_material |
logical, whether to use set the custom rendering material properties for path visualization using |
n x 3 matrix, the coordinates of the path, with appropriate ones duplicated for rgl pair-wise segments3d rendering.
vis.paths
if you need to draw many paths, geodesic.path
to compute a geodesic path.
Other surface mesh functions:
face.edges()
,
label.border()
,
mesh.vertex.included.faces()
,
mesh.vertex.neighbors()
,
subject.surface()
## Not run:
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', views='si');
vis.path.along.verts(surface$vertices, p[[1]]);
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.