Diffusion Imaging In Python

Dipy is a free and open source software project for computational neuroanatomy, focusing mainly on diffusion magnetic resonance imaging (dMRI) analysis. It implements a broad range of algorithms for denoising, registration, reconstruction, tracking, clustering, visualization, and statistical analysis of MRI data.

Getting Started

Here is a simple example showing how to calculate color FA. We use a single Tensor model to reconstruct the datasets which are saved in a Nifti file along with the b-values and b-vectors which are saved as text files. In this example we use only a few voxels with 101 gradient directions:

from dipy.data import get_data
fimg, fbval, fbvec = get_data('small_101D')

import nibabel as nib
img = nib.load(fimg)
data = img.get_data()

from dipy.io import read_bvals_bvecs
bvals, bvecs = read_bvals_bvecs(fbval, fbvec)

from dipy.core.gradients import gradient_table
gtab = gradient_table(bvals, bvecs)

from dipy.reconst.dti import TensorModel
ten = TensorModel(gtab)
tenfit = ten.fit(data)

from dipy.reconst.dti import fractional_anisotropy
fa = fractional_anisotropy(tenfit.evals)

from dipy.reconst.dti import color_fa
cfa = color_fa(fa, tenfit.evecs)

Alt text

News

June 1, 2016, 1:20 p.m.

DIPY will be an official exhibitor for this years OHBM in Geneva. OHBM website here


Share
Feb. 10, 2016, 10 a.m.

Dipy 0.11 released February 21, 2016


Share

Tweets

Fri Feb 16

https://t.co/4xY5cmSBhD

Fri Feb 16

Ask questions about DIPY in our live chatroom! Link here https://t.co/qcTLDCAePx

Tue Feb 13

RT @ranveeraggarwal: @dipymri is accepting student applications for #GSoC this year under the umbrella of @ThePSF. Cool #graphics #viz #neu…

Fri Feb 09

RT @neurohackademy: Applications for the Summer Institute in Neuroimaging and Data Science (Neurohackademy for short) are now open! Hope to…

Mon Feb 05

More than 20 diffusion reconstruction models implemented in DIPY! How many do you really know? https://t.co/hCTTLrDu8d

Highlighted Publications

Dipy, a library for the analysis of diffusion MRI data

Garyfallidis, Eleftherios and Brett, Matthew and Amirbekian, Bagrat and Rokem, Ariel and Van Der Walt, Stefan and Descoteaux, Maxime and Nimmo-Smith, Ian

Bibtex

@ARTICLE{10.3389/fninf.2014.00008, AUTHOR={Garyfallidis, Eleftherios and Brett, Matthew and Amirbekian, Bagrat and Rokem, Ariel and Van Der Walt, Stefan and Descoteaux, Maxime and Nimmo-Smith, Ian}, TITLE={Dipy, a library for the analysis of diffusion MRI data}, JOURNAL={Frontiers in Neuroinformatics}, VOLUME={8}, YEAR={2014}, NUMBER={8}, URL={http://www.frontiersin.org/neuroinformatics/10.3389/fninf.2014.00008/abstract}, DOI={10.3389/fninf.2014.00008}, ISSN={1662-5196} , ABSTRACT={Diffusion Imaging in Python (Dipy) is a free and open source software projectfor the analysis of data from diffusion magnetic resonance imaging (dMRI)experiments. dMRI is an application of MRI that can be used to measurestructural features of brain white matter. Many methods have been developed touse dMRI data to model the local configuration of white matter nerve fiberbundles and infer the trajectory of bundles connecting different parts of thebrain.Dipy gathers implementations of many different methods in dMRI, including:diffusion signal pre-processing; reconstruction of diffusion distributions inindividual voxels; fiber tractography and fiber track post-processing, analysisand visualization. Dipy aims to provide transparent implementations forall the different steps of dMRI analysis with a uniform programming interface.We have implemented classical signal reconstruction techniques, such as thediffusion tensor model and deterministic fiber tractography. In addition,cutting edge novel reconstruction techniques are implemented, such asconstrained spherical deconvolution and diffusion spectrum imaging withdeconvolution, as well as methods for probabilistic tracking and originalmethods for tractography clustering. Many additional utility functions areprovided to calculate various statistics, informative visualizations, as wellas file-handling routines to assist in the development and use of noveltechniques.In contrast to many other scientific software projects, Dipy is not beingdeveloped by a single research group. Rather, it is an open project thatencourages contributions from any scientist/developer through GitHub and opendiscussions on the project mailing list. Consequently, Dipy today has aninternational team of contributors, spanning seven different academic institutionsin five countries and three continents, which is still growing.}}