Phybers: a package for brain tractography analysis

Front Neurosci. 2024 Mar 11:18:1333243. doi: 10.3389/fnins.2024.1333243. eCollection 2024.

Abstract

We present a Python library (Phybers) for analyzing brain tractography data. Tractography datasets contain streamlines (also called fibers) composed of 3D points representing the main white matter pathways. Several algorithms have been proposed to analyze this data, including clustering, segmentation, and visualization methods. The manipulation of tractography data is not straightforward due to the geometrical complexity of the streamlines, the file format, and the size of the datasets, which may contain millions of fibers. Hence, we collected and structured state-of-the-art methods for the analysis of tractography and packed them into a Python library, to integrate and share tools for tractography analysis. Due to the high computational requirements, the most demanding modules were implemented in C/C++. Available functions include brain Bundle Segmentation (FiberSeg), Hierarchical Fiber Clustering (HClust), Fast Fiber Clustering (FFClust), normalization to a reference coordinate system, fiber sampling, calculation of intersection between sets of brain fibers, tools for cluster filtering, calculation of measures from clusters, and fiber visualization. The library tools were structured into four principal modules: Segmentation, Clustering, Utils, and Visualization (Fibervis). Phybers is freely available on a GitHub repository under the GNU public license for non-commercial use and open-source development, which provides sample data and extensive documentation. In addition, the library can be easily installed on both Windows and Ubuntu operating systems through the pip library.

Keywords: bundle atlas; diffusion MRI; fiber clustering; python; tractography; white matter segmentation.

Grants and funding

The author(s) declare financial support was received for the research, authorship, and/or publication of this article. The authors acknowledge the financial support of ANID (Agencia Nacional de Investigación y Desarrollo), Chile: Doctorado Nacional/2019-21191506 (Doctoral scholarship, LG), FONDECYT 1221665 (Research grant, PG, AC, CH), ANILLO ACT210053 (Research grant, PG), FONDECYT Postdoctorado 3220729 (Postdoctoral fellowship, CR), Basal Centers FB0008 (AC3E, Research Center, PG), FB210017 (CENIA, Research Center, PG), and FB0001 (CeBiB, Research Center, CH).