dMRI-Lab: advanced diffusion MRI with Matlab


This is a Work-In-Process 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:
    • >> setup__DMRIMatlab_toolbox('useparallel',true);
    • >> setup__DMRIMatlab_toolbox('useparallel',false); or simply:
      >> setup__DMRIMatlab_toolbox;

    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).

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


The package is by now distributed as an alpha version in obfuscated p-code for the purpose of peer reviewing. It will be released as open-source with a GPL-like license upon publication of the related scientific papers (see below). Until then, you are free to download, try, and use it "as-it-is". In case you use the package for your own research, we ask you to kindly cite it as:

Antonio Tristán-Vega and Santiago Aja-Fernández
"dMRI-Lab: advanced diffusion MRI with Matlab"
[Online resource]
April 2020. Universidad de Valladolid. Spain


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 dMRI denoising:

On HARDI imaging and ODF estimation:

On computational dMRI:

Additionally, you will find implementations for the methods described in two papers currently under review:

Santiago Aja-Fernández, Antonio Tristán-Vega, and Derek K. Jones
"Apparent Propagator Anisotropy from Time-Efficient Diffusion MRI Acquisitions"
March 2020. Submitted to NeuroImage
BioRxiv preprint:

Antonio Tristán-Vega and Santiago Aja-Fernández
"MiSFIT: A Unified Approach for the Computational Analysis of Diffusion MRI with Multi-shell Acquisitions"
April 2020. Submitted to NeuroImage