find_nv_kdtree | R Documentation |
Find nearest mesh vertex for query coordinates using kdtree.
find_nv_kdtree(query_coordinates, mesh, threads = parallel::detectCores())
query_coordinates |
nx3 numerical matrix of x,y,z coordinates. These are typically the vertex positions of a second (spherical!) mesh for that you need per-vertex data (e.g., the |
mesh |
fs.surface instance, see |
threads |
integer, the number of threads to run in parallel. |
named list with keys 'index' and 'distance'. 'index': integer vector, the n
vertex indices which are closest to the nx3
matrix of query_coordinates. 1-based indices for R are returned. 'distance': double vector, the distances to the respective vertices in the 'index' key.
@note The mesh must be spherical, and the query_coordinates must be located on the mesh sphere.
https://github.com/ThomasYeoLab/CBIG/blob/master/external_packages/SD/SDv1.5.1-svn593/BasicTools/MARS_findNV_kdTree.m
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.