Code for "Individualized Functionnectome for the statistical assessment of white matter circuits underlying task-fMRI activations in glioma patients"
Description
This repository contains the Python (v3.12) code to convert a tractogram to the set of anatomical priors of structural connectivity of each brain voxel to any other brain voxel.
This code represents the core of the paper: "Individualized Functionnectome for the statistical assessment of white matter circuits underlying task-fMRI activations in glioma patients" by Sighinolfi G. et al., published in NeuroImage: Clinical (2026). doi: 10.1016/j.nicl.2025.103940
If you use this source, or part of it, please cite:
Sighinolfi G, Leemans A, Manners DN, Cantoni C, Vornetti G, Motta L, Franceschi E, Tonon C, Lodi R, De Luca A. Individualized functionnectome for the statistical assessment of white matter circuits underlying task-fMRI activations in glioma patients. Neuroimage clin. 2026;49:103940. doi: 10.1016/j.nicl.2025.103940.
The code requires as input:
- A tractogram in the MRtrix3 (https://www.mrtrix.org/) .tck format in the 2mm MNI space (to register a .tck tractogram to the MNI, see the following guide: https://community.mrtrix.org/t/registration-using-transformations-generated-from-other-packages/2259);
- A template image, which is the result of the multiplication between a subject-specific binary brain mask and a graded MNI image (the aim is to obtain a unique value for each voxel inside the brain);
- Optional: a file containing the weight assigned to each streamline, for example using SIFT2 (https://mrtrix.readthedocs.io/en/dev/reference/commands/tcksift2.html); otherwise a unitary weight is assigned to each streamline;
- Optional: the path to the output file; otherwise, it is saved as prior.h5 in the same folder as the tractogram.
The output is a .h5 file containing the set of anatomical priors of each brain voxel, which is readily usable in the Functionnectome framework: https://github.com/NotaCS/Functionnectome.
Please note that this code is computationally heavy, and it may take 4-5 running in parallel on 8 CPU cores.
Files
Additional details
Software
- Programming language
- Python