I have a dataset of anatomical T1 images (and resting state) data from a transcranial magnetic stimulation (TMS) study. On each skull is affixed a fiducial marker positioned were the TMS stimulator was positioned. I am trying to do two things:
- find the distance from the cortical location targeted by TMS to the closest point on the skull, so I can calculate the difference between the actual TMS position and the to the closest point on the skull to the location of the targeted cortex.
- I also want to find the find the closest point on the cortical surface to the fiducial marker, so I can place a spherical ROI.
I have imported the structural data from freesurfer and used the @SUMA_Make_Spec_FS to bring it into afni. My thought was to use a spherical ROI that has a radius large enough to intersect the gray matter mask, and then search for the path that has the shortest euclidean distance between the voxel used for the center of the fiducial marker, and the intersection of the two masks. This seems pretty clunky and I was wondering if there is a way to "grow a sphere from a point (voxel), and find when it intersect with a mask, assuming they are in the same space.
Please excuse my ignorance and thanks for any help you can provide.