External Email - Use Caution
@Chris:
I recently needed exactly what you want in Matlab, feel free to use it:
https://github.com/dfsp-spirit/comp_neuro_science/blob/master/matlab_utility...
A usage example is included (see script). It's not terribly efficient, but it works. To get the direct neighbors (in distance 1) of vertex 500:
[verts, faces] = read_surf("path/to/lh.white"); mesh_neighborhood(faces, [500], 1);
Hint: beware of indexing differences (1-based in Matlab, 0-based in C/FreeSurfer) when using it.
Tim
-- Dr. Tim Schäfer Postdoc Computational Neuroimaging Department of Child and Adolescent Psychiatry, Psychosomatics and Psychotherapy University Hospital Frankfurt, Goethe University Frankfurt am Main, Germany
On February 14, 2020 at 4:15 PM "Douglas N. Greve" dgreve@mgh.harvard.edu wrote:
You'll have to use read_surf.m to read in the fsaverage surface. The surface will neighbor info
On 2/13/2020 1:51 PM, Mcnorgan, Christopher wrote:
External Email - Use Caution
I’m interested in working with data mapped to the .sphere icosohedrons. I understand from a response from Doug back in 2017 that: waveforms = fast_vol2mat(MRIread('waveform.nii.gz')); will give me a v x time matrix of values from my functional values. In the case of fsaverage, I believe I can expect somewhere around 160K rows, 1 per vertex, for each hemisphere. I was wondering how I might be able to determine the neighbors (i.e., vertices connected by an edge) for any vertex v?
Thanks, Chris
/**********************************************
- Chris McNorgan
- Assistant Professor
- Department of Psychology
- University at Buffalo,
- The State University of New York
- http://ccnlab.buffalo.edu/
- Office: 716.645.0236
- Lab: 716.645.0222
**********************************************/
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer