open-discussion > RE: Extract Adjacency Matrix from Human Connectom Project MSMAll.dscalar.nii-file
Jul 27, 2023  06:07 PM | Damon Pham
RE: Extract Adjacency Matrix from Human Connectom Project MSMAll.dscalar.nii-file

Hi Bas,


Thanks and sorry for the terribly delayed reply; I didn't know we had a Forums here!


With CIFTI data, spatial information is contained in a GIFTI file (*.surf.gii) which is separate from the CIFTI file having the measurements (*.dtseries.nii, *.dscalar.nii, *.dlabel.nii).


For HCP surface data at 32k, if you just want the vertex adjacency matrix, since all subjects are registered to a mesh with the same topology, you just need one file--and we've included it in ciftiTools: see `load_surf`. It will give a surface with the same topology as the ones used with the HCP. The `faces` component of the surface object returned by `load_surf` will give the three vertices in each face. To make an adjacency matrix: if a vertex shares a face with another vertex, it's adjacent, so collect for each vertex set adjacency to 1 for all other vertices it shares faces with, 0 otherwise. I might look into adding a function for this in our package.

Threaded View

TitleAuthorDate
basmats Jan 17, 2023
RE: Extract Adjacency Matrix from Human Connectom Project MSMAll.dscalar.nii-file
Damon Pham Jul 27, 2023