Hi Gabriele,
I think you forgot the attachement. I'm not sure what mesh_vertex_nearest is. If you use the tkmedit tool (find closest vertex) does that give you the correct point? If speed is not an issue you can simply do an exhaustive search, although that will be slow if you need to do it for any sizeable chunk of the surface. The way we do it internally is to build a spatial lookup table to restrict the vertices we have to search over.
cheers Bruce
On Thu, 5 May 2011, Gabriele Arnulfo wrote:
Dear freesurfer experts,
my scene is as follow: i need to find the nearest vertex in the pial surface to a subset of specified control points. I've already checked all the transformation matrices and the points are correctly located either in scanner RAS and in tkrRAS. Now the problem is that using mesh_vertex_nearest freesurfer tool or dsearchn/ DelaunayTri class matlab tools the resulting vertexes are not so correctly located as they visually would be. I'll attach some screenshots from freeview for better understanding.
As you guys can easily see in the attached png ,the cursor is located at the "nearest vertex" position while the control point, which is from the left the second red dot, is at least located at the opposite side of the right hemisphere. This doesn't happen for ALL the points but only for some of them like this one. Is there a more reliable way to compute automatically the nearest vertex for a specified control point?
Thank in advance,