hi Corey-

There's many ways to do this, but here's how I would:
1.transform the talairach coordinates to RAS (using some transform you have
already determined), that's what the surface vertices are in.  You probably
want to use the pial surface.
[vert_coords]=read_surf(SURFFILE);

2.for each electrode coordinate, find the index of the nearest vertex by
calculating the euclidean distances to each point on the surface.
[~,I]=pdist2(vert_coords,elec_coords,'euclidean','Smallest',1); %pdist2 is
only available in newer versions of matlab, it's trivial to write your own
as well

3.use these indicies to then get the roi from the actbl:
[averts,albl,actbl]=read_annotation(APARCFILE);
for a=albl(I)',
   elec_rois{a}=actbl.struct_names(find(actbl.table(:,5)==a))
end

--
brian

On Mon, Jul 18, 2011 at 9:38 PM, Corey Keller <corey.j.kel...@gmail.com>wrote:

> Hi Freesurfers,
>
> I have talairach coordinates of electrodes sitting on the brain. I am
> hoping to use the Desikan-Killiany parcellation scheme to determine
> which cortical region each electrode lies closest to in standard
> space. I am using read_annotation in matlab to read the lh.aparc.annot
> file and find the vertices associated with each label. I am wondering
> how to determine which label each electrode lies closest to? Is there
> a TAL or RAS to vertex function in matlab? Thanks.
>
> Best,
> Corey
> _______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
>
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply via email to