geod.vert.neighborhood | R Documentation |
Compute all vertices within given geodesic distance on the mesh.
geod.vert.neighborhood(
mesh,
vertex,
max_distance = 5,
include_max = TRUE,
return_distances = TRUE
)
mesh |
an instance of |
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. |
max_distance |
double, the neighborhood size. All mesh vertices in geodesic distance smaller than / up to this distance will be returned. |
include_max |
logical, whether the max_distance value is inclusive. |
return_distances |
logical, whether to compute the 'distances' entry in the returned list. Doing so is a little bit slower, so it can be turned off if not needed. |
named list with the following entries: 'vertices': integer vector, the indices of all vertices in the neigborhood. 'distances': double vector, the distances to the respective vertices (unless 'return_distances' is FALSE).
This function uses the pseudo-geodesic distance along the mesh edges.
## Not run:
sjd = fsaverage.path(TRUE);
surface = subject.surface(sjd, 'fsaverage', surface = "white", hemi = "lh");
res = geod.vert.neighborhood(surface, 12345L, max_distance = 10.0);
res$vertices;
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.