nn_interpolate_kdtree: Get per-vertex data at vertices closest to the given query...

View source: R/kdtree.R

nn_interpolate_kdtreeR Documentation

Get per-vertex data at vertices closest to the given query coordinates on the mesh.

Description

Return per-vertex data at the vertices closest to the given query points.

Usage

nn_interpolate_kdtree(query_coordinates, mesh, pervertex_data)

Arguments

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 fsaverage6 mesh).

mesh

fs.surface instance, see read.fs.surface or subject.surface to get one, or turn an rgl tmesh into one with tmesh3d.to.fs.surface.

pervertex_data

numerical vector, the continuous per-vertex data for the vertices of the mesh.

Value

the per-vertex data for the vertices closest to the query coordinates.


dfsp-spirit/haze documentation built on Feb. 28, 2023, 11:45 p.m.