output from SurfToSurf

Hello AFNI team,

I have a question about the output parameters from SurfToSurf.

I have an anatomical T1 images data from a TMS study and would like to position the TMS with fiducial marker. The marker includes 3 points which are located outside the cortex (S1) and I am trying to project from each point of S1 to the cortex (S2, skull-stripped anatomical). I am using SurfToSurf with 3 points of S1 and ply file of S2.

SurfToSurf -i_1D paddle.1D paddle.1D.topo
-i_ply nosk.anat.ply -prefix s2s \
-output_params NearestTriangleNodes NearestNodeCoords

While I was checking the s2s.1D output file, it says
#Col. 4…6:

S2we_S1n: Weights assigned to nodes on surf 2 (S2)

that are closest neighbors of nj.

  1. Could you tell me what the weights mean in here? and how does SurfToSurf find the closest triangle t of S2? I am guessing the closest triangle could be found by measuring the shortest distance between one node in S1 and the triangle of S2. If this is not true, please fix me.

  2. If the plane created by 3 nodes in S1 is perpendicular to the plane in S2, can we still use SurfToSurf even the normal vector from the S1 plane is parallel to the S2 surface?

Any help would be really appreciated!
Taek