Skip to content

Third-party software


Some converters require a recent version of dcm2niix to transform DICOM files into NIfTI:

adni-to-bids x
aibl-to-bids x
nifd-to-bids x

Please check the installation instructions for all platforms here.

Clinica requires dcm2niix version 1.0.20190902 or later.

Pipeline-specific interfaces

Not all the following dependencies are necessary to install and run Clinica. You may want to only install the software packages used by certain pipelines of Clinica. Pipelines' specific dependencies are listed below:

ANTs Convert3D FreeSurfer FSL ITK Matlab MRtrix3 PETPVC SPM
t1-volume-* x x
t1-freesurfer x
dwi-preprocessing-* x x x x
dwi-dti x x x
dwi-connectome x x x
pet-surface x x* x* x
pet-volume x* x x* x
statistics-surface x

CAT12 toolbox

Starting from Clinica v0.3.7, the CAT12 toolbox is no longer needed for the t1-volume and pet-volume pipelines. For previous versions of Clinica, you will need to download the latest version of the toolbox here and follow the instructions to ensure that your cat12 folder is located in your spm/toolbox folder.

*You only need to install ITK if you plan to perform partial volume correction using PETPVC.

Depending on the architecture and OS of your system, setup of third party libraries can change. Please refer to each tool’s website for installation instructions:

  • ANTs v2.3.1 Download here and follow the instructions on the ANTs wiki.
  • Convert3D Download here.
  • FreeSurfer
  • For Linux users, download and install FreeSurfer following the instructions on the wiki. Please note that on Ubuntu you will need to install the packages tcsh and libjpeg62 ( a sudo apt-get install tcsh libjpeg62 should do the job).
  • For Mac users, download here and follow the instructions on the FreeSurfer wiki.
  • FSL 6.0 Download here and follow the instructions on the FSL wiki (this page for Linux users and this page for Mac users).
  • ITK Follow the instructions on the ITK blog (this page for Linux users and this page for Mac users).
  • MRtrix3 Follow the instructions on the MRtrix website
  • For Linux users: use the official package for Anaconda or follow this set of instructions to build it from source.
  • For Mac users: use the official package for Anaconda or the official installer. There is also this Homebrew formula, although large dependencies such as XCode and Qt5 are required.
  • Matlab
  • PETPVC 1.2.4 Follow the instructions here. Do not forget to compile in RELEASE mode, otherwise, partial volume correction will be very slow.
  • SPM12 Download the latest version here and follow the instructions on the SPM wiki (this page for Linux users and this page for Mac users).
  • For systems running on MacOS Big Sur, a development version of SPM12 (check here for updates) as well as a more recent release of the MCR (minimum 2019a) are required.

Do not forget to check the installations following each tool’s guidelines.

Environment variables setup

Edit the configuration file associated to your shell. If you are using bash, it can be ~/.bashrc or ~/.bash_profile, if you are using zsh, it must be ~/.zshrc. Your file must look like as below. Please be careful if you copy/paste this, some adjustments are needed. You must specify on the corresponding lines the path to your different installations.

# System language setting:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

# Miniconda
source /path/to/your/Miniconda/etc/profile.d/

# ANTs
export ANTSPATH="/path/to/your/ANTs/"

# FreeSurfer
export FREESURFER_HOME="/Applications/freesurfer"
source ${FREESURFER_HOME}/ &> /dev/null

# Uncomment the line below if you are on Mac:
#export FSLDIR="/usr/local/fsl"
# Uncomment the line below if you are on Linux:
#export FSLDIR="/usr/share/fsl/6.0"
export PATH="${FSLDIR}/bin":${PATH}
source ${FSLDIR}/etc/fslconf/

# Matlab
export MATLAB_HOME="/path/to/your/matlab/bin/"
export MATLABCMD="${MATLAB_HOME}/matlab"

export SPM_HOME="/path/to/your/spm12"


zsh shell users will have to add this right before the last line of their configuration file to enable autocompletion in Clinica:

autoload bashcompinit
source ~/.bash_completion.d/

You must also add SPM to the MATLAB path variable if you installed it as a toolbox. To do so, add the following line to your startup.m file located in your initial working folder, by default ~/Documents/MATLAB (see here for more details). If the file does not exist, you can create it and type inside:


You can also replace the previous line by the following, assuming the SPM_HOME environment variable is set in your ~/.bashrc file.

[~, spmhome] = system('source ~/.bashrc > /dev/null; echo $SPM_HOME;');
spmhome = strsplit(spmhome,'\n');


zsh shell users will have to replace ~/.bashrc by ~/.zshrc.