[Mne_analysis] Identifying adjacent sources

acgt2 at cam.ac.uk acgt2 at cam.ac.uk
Wed May 15 18:40:05 EDT 2013
Search archives:

Hi Steve,

 

I did the attached scripts a couple of years ago for a colleague, and looking at it today I can’t work out what I was doing. But I’ve tried it just now and it seems to work, but probably best to check it thoroughly yourself if you want to use it.

 

The script ‘SetupGetAdjacent.m’ makes a hashtable containing all the adjacent vertices from a specified surf file (normally in your subjects directory).

 

At the bottom of this script a function is called (‘getadjacent.m’) – This function accepts the central vertex label (as a number), an integer i (a distance/’radius’ from the central vertex you are interested in, measured in vertices), and the hashtable you have just created. The function gives out a) a list of the vertices ringing the centre vertex at a radius i and b) a list of the vertices *inside* this ring.

 

So if you ask for getadjacent(‘4756’, 1, ‘myfile.surf’) you get out:

 

adjacents =  the 6 neighbouring vertices to the central vertex

passed = the value of the central vertex itself

 

if you ask for getadjacent(‘4756’, 2, ‘myfile.surf’) you get:

 

adjacents  = the 12 vertices forming a ring around the central vertex at with a radius of 2 

passed = all the vertices inside this ring. 

 

etc.

I should be clear that, unfortunately, this is not done on a downsampled, ‘morphgraded’ mesh, ie 642, 2562, 10242 vertices (if you choose ‘—morphgrade 3,4 or 5’ etc), which is what you were asking for. However, due to the way that the surf vertices are labelled, one can get an ‘adjacent’ list or a ‘passed’ list that *only* contains vertices that are in the ‘morphgraded’ mesh by simply deleting any vertices from ‘adjacents’ or ’passed’ which have a label higher than 642 (or 2562, 10242 or whatever the size of your morphgraded source mesh is). So if you did --morphgrade 5 when you did your estimation, and selected a radius of 10 for getadjacent(), then if you delete any vertices in the resulting ‘passed’ list that are greater than 10242, then you will be left with only ‘passed’ vertices you have estimation values for.

 

Hope this is helpful,

 

a

 

 

From: Stephen Politzer-Ahles [mailto:politzerahless at gmail.com] 
Sent: 15 May 2013 05:23
To: A.C.G. Thwaites
Subject: Re: [Mne_analysis] Identifying adjacent sources

 

Hi Andy,

Thanks, I appreciate it!

 

On Mon, May 13, 2013 at 11:36 AM, <acgt2 at cam.ac.uk> wrote:

Hi Steve – I’ve found it, but I can’t remember how it works, so I’ll send it tomorrow!

 

Andy

 

From: mne_analysis-bounces at nmr.mgh.harvard.edu [mailto:mne_analysis-bounces at nmr.mgh.harvard.edu] On Behalf Of Stephen Politzer-Ahles
Sent: 11 May 2013 09:02
To: mne_analysis at nmr.mgh.harvard.edu
Subject: [Mne_analysis] Identifying adjacent sources

 

Hello,

Is there a straighforward method to figure out, for any cortical source or vertex, what the adjacent cortical sources/vertices are? 

More specifically, I have extracted .amp timecourse files for each participant and condition that look something like this:
    100779 9.76119e-13 9.8006e-13 1.01097e-12 1.0584e-12
    102810 5.77402e-13 4.74985e-13 6.13183e-13 8.53066e-13
    103338 7.69642e-13 1.13359e-12 1.48948e-12 1.78157e-12
    103374 6.44688e-13 8.72736e-13 1.09166e-12 1.24282e-12

where the first number in each row is the vertex that timecourse comes from (and the following columns are the current estimates at each timepoint). I'm interested in doing a permutation-based spatiotemporal clustering test, so what I'd like to be able to do is, for each of those vertices, to get a list of which sources are adjacent to it. (Not necessarily which vertices are adjacent to it, since my understanding is that the cortical sources represent just a subset of the vertices present in the original tesselation.) I assume that after triangulation there must be some record of this, or some way to find it out, but I can't figure out where to find it. By the way, my structural images were segmented in Freesurfer, so the triangulations are in .surf files rather than .tri files.

Any advice is greatly appreciated! Thank you,
Steve Politzer-Ahles



-- 
Stephen Politzer-Ahles
University of Kansas
Linguistics Department
http://people.ku.edu/~sjpa/ 




-- 
Stephen Politzer-Ahles
University of Kansas
Linguistics Department
http://people.ku.edu/~sjpa/ 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20130515/227b404c/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: getadjacent.m
Url: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20130515/227b404c/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: SetupGetAdjacent.m
Url: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20130515/227b404c/attachment-0001.pl 


More information about the Mne_analysis mailing list