Skip to content

Neuroimaging in Python

Taylor Salo edited this page Apr 21, 2018 · 2 revisions

There is an entire suite of Python libraries for reading, processing, and analyzing MRI data, primarily centered around the nipy ecosystem. A partial list of these libraries:

  • nibabel: File reading/writing of MRI data
    • Nibabel supports a range of file types, including gzipped nifti (nii.gz), standard nifti (nii), and Analyze (img/hdr).
    • Support for AfNI files (BRIK/HEAD) is under development.
  • nipype: Pipelines and interfaces for neuroimaging analysis packages
    • Nipype provides a pure Python means of calling neuroimaging packages like AfNI, FSL, SPM, and Freesurfer. You can even chain interfaces from different packages into pipelines.
  • nilearn: Statistical learning of neuroimaging data
    • Nilearn is also great at extracting data from ROIs, applying masks, loading public datasets, and generating figures.
  • nistats: Statistical analysis of neuroimaging data
    • Nistats aims to provide the same modeling and analysis capabilities currently provided in other tools, like FSL, SPM, and AfNI, but in pure Python.
  • NiMARE: Neuroimaging meta-analysis and related analyses
    • NiMARE is currently under development, but it aims to provide a range of image- and coordinate-based meta-analytic algorithms with a shared syntax.
  • dipy: Diffusion imaging processing and analysis tools
  • heudiconv: DICOM-to-Nifti conversion into BIDS format
  • pybids: Tools for interacting with BIDS datasets