dMRI-Lab: advanced diffusion MRI with Matlab


This is a toolbox designed for Matlab(R) and aimed at the computational analysis of diffusion MRI. It addresses basic concepts such as Diffusion Tensor Imaging (DTI), but also advanced topics like High Angular Resolution Diffusion Imaging (HARDI, including estimation and representation of Orientation Distribution Functions-ODF), multi-shell samplings, and computational diffusion MRI. We have tested the library for Matlab versions starting R2015b, but we advice using a more recent version. A working license for the Parallel Computing Toolbox is strongly recommended (but not necessary).


  1. Download the package and unzip to a local folder at will.
  2. From the Matlab command window, cd to the home folder, i. e. that containing the setup script "setup__DMRIMatlab_toolbox.m".
  3. Run the setup script as either: for using/avoid using the Parallel Computing Toolbox. In case you don't have a working license for it, the script will not throw an error. This will setup your Matlab path for the present session (it won't make any permanent change).
    • >> setup__DMRIMatlab_toolbox('useparallel',true);
    • >> setup__DMRIMatlab_toolbox('useparallel',false); or simply: >> setup__DMRIMatlab_toolbox;
  4. Make sure you have a suitable C/C++ compiler installed in your computer (in Windows, we recommend installing the "MinGW" Add-On from the Matlab interface).
  5. Run the script:
    • >> makefile_mexcode

         which will build all the necessary mex files within the toolbox.

  1. Open/run some of the demo files in the "examples" folder to get started.


The code is licensed under GNU GENERAL PUBLIC LICENSE (Version 3, 29 June 2007)


You might be as well interested in other related software products developed at the LPI.


Note this library is a compendium of many techniques delivered from the original research carried out at the LPI for more than a decade. As such, you will find implementations for the methods described in several papers listed in our publications site.

On DT-MRI: (Noise propagation in DT-MRI) (Noise propagation in DT-MRI; journal version) (Discontinued Saturn software)

On dMRI denoising: (Joint Wiener filter, jLMMSE) (Joint Wiener filter, jLMMSE; journal version) (Joint anisotropic Wiener filter - jaLMMSE)

On HARDI imaging and ODF estimation: (HARDI-OPDT) (HARDI - cQ-Balls, pQ-Balls) (HARDI-cOPDT, pOPDT)

On computational dMRI: (HARDI/multi-shell - AMURA) (HARDI/multi-shell - AMURA-APA) (Multi-shell imaging - MiSFIT) (Multi-shell imaging - Free water estimation with spherical means) (Multi-shell imaging - gAMURA) (Arbitrarily sampled diffusion imaging - HYDI-DSI)