Brain Parcellation based on graph theory / community detection python package

Is there any existing tools for this?
If not I’ll write my own using nilearn, networkx, nibabel …

CBIG/stable_projects/brain_parcellation/Schaefer2018_LocalGlobal at master · ThomasYeoLab/CBIG · GitHub is good but not in python.

My thinking is simple: I have data preprocessed with fMRIprep, have the confounds. I can calculate connectivity matrix for whole brain (all voxels, masked), then run louvain algorithm get the communities, assign each voxel a label, and save the image back with label values.

I’d be surprised if no one has attempted this simple logic in python…

well, couldn’t find and implemented anyways.

If anyone finds this useful, the code will be open source after my thesis is done : D

1 Like