hi sebastian,you simply need to read the geometry file and the morphometry vector and the two pieces will give you what you need.the geometry file gives you the relation between vertex indices via the faces array.```def return_neighbors(faces, vertex_index):faces_containing_vertex = np.nonzero((faces == vertex_index).sum(axis=1))[0]neighbors = np.setdiff(faces[faces_containg_vertex, :].flatten(), vertex_index)
return neighbors```cheers,
satraOn Mon, Jul 15, 2013 at 9:52 AM, Sebastian Urchs <sebastian.urchs@gmail.com> wrote:
Hi Satra,thank you very much. I believe I have to rephrase my question as I didn't completely think it through. I need to find neighboring vertices to a specified vertex and then read out their thickness values. I don't think I can do this directly from the morphometry vector that pysurfer gives me.Thanks again, I'll send another mail to the mailinglist.Best,SebastianOn 15 July 2013 15:22, Satrajit Ghosh <satra@mit.edu> wrote:
hi sebastian,please take a look at pysurfer (https://github.com/nipy/pysurfer) and nibabel (https://github.com/nipy/nibabel).the relevant code is here:cheers,
satraOn Mon, Jul 15, 2013 at 9:11 AM, Sebastian Urchs <sebastian.urchs@gmail.com> wrote:
_______________________________________________Hi,
I am trying to figure out how to load thickness data into python such that I would be able to identify the thickness at a given mesh node and also identify surrounding nodes. I searched the mailinglist and found this http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg07307.html but this unfortunately did not solve my question as I was unable to find a downloadable version of pymgh.Is there some python package that you could point me to and that allows me to load thickness data and do analysis in python?Thanks in advance!Sebastian
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.