Skip to content

Third-party software

Converters

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

dcm2niix
adni-to-bids x
aibl-to-bids x
nifd-to-bids x
oasis-to-bids

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
machine-learning-*

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:

Environment variables setup

When installing some of the third party software, environment variables might be needed in order to configure some installations.

If you simply run the export and source commands in your terminal, these environment variables will be defined only for the duration of your session, and will be lost if you re-launch your terminal.

In order to define these variables permanently, you need to manually 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 should be ~/.zshrc.

test before

Please do not copy/paste the provided commands without adapting them to your system and without testing them. Most paths provided here require to be adapted to your system, and also depends on how you installed the software. A good approach is to verify that the different paths you want to assign to a variable exist first. If they do, then try running the export and source commands in your terminal, and verify that the software run as expected. You can also verify that the pipeline you want to use is also running as expected. If this works, then consider modifying your shell configuration file to have these variables automatically defined on every session.

ANTs

Installation

To install ANTs, download it from here and follow the instructions on the ANTs wiki.

Configuration

We strongly recommend installing ANTs >= 2.5.0 from which no environment variable are needed.

Nonetheless, if you are using an older version of ANTs, make sure to have the following environment variables defined:

export ANTSPATH="/path/to/your/ANTs/"
export PATH=${ANTSPATH}:${PATH}

Convert3D

You can find more details about Convert3D here.

Installation

You have two options to install Convert3D:

Freesurfer

You can find more details about Freesurfer here.

Installation

On Linux

Download and install FreeSurfer following the instructions on the wiki.

Note

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

On MacOS

Download it from here and follow the instructions on the FreeSurfer wiki.

Configuration

Make sure to have the following environment variables defined:

export FREESURFER_HOME="/Applications/freesurfer"
source ${FREESURFER_HOME}/SetUpFreeSurfer.sh &> /dev/null

FSL

We recommend installing FSL 6.0.

Installation

On Linux

Download it from here and follow the instructions on the FSL wiki.

On MacOS

Download it from here and follow the instructions on the FSL wiki.

Configuration

On Linux

Make sure to have the following environment variables defined:

export FSLDIR="/usr/share/fsl/6.0"
export PATH="${FSLDIR}/bin":${PATH}
source ${FSLDIR}/etc/fslconf/fsl.sh
On MacOS

Make sure to have the following environment variables defined:

export FSLDIR="/usr/local/fsl"
export PATH="${FSLDIR}/bin":${PATH}
source ${FSLDIR}/etc/fslconf/fsl.sh

ITK

You can find more details about ITK here.

Installation

On Linux

Follow the instructions on the ITK blog.

On MacOS

Follow the instructions on the ITK blog.

MRtrix3

You can find more details about MRtrix3 here.

Installation

You can find the official instructions on the MRtrix website.

On Linux

You have basically two options:

Note

Note that using the conda package should be easier in most cases.

On MacOS

Note

As for Linux, note that using the conda package should be easier in most cases.

Matlab

You can find more details about Matlab here.

Note

Note that using Matlab requires having a valid license which might be available through your university or institution.

Configuration

Make sure to have the following environment variables defined:

export MATLAB_HOME="/path/to/your/matlab/bin/"
export PATH=${MATLAB_HOME}:${PATH}
export MATLABCMD="${MATLAB_HOME}/matlab"

PETPVC

You can find more details about PETPVC here.

Installation

You can find the official instructions in the README of this page.

You have basically three options:

Note

If building from source, do not forget to compile in RELEASE mode, otherwise, partial volume correction will be very slow.

SPM12

You can find more details about SPM12 here.

Note that SPM12 works with Matlab such that clinica pipelines which require SPM12, will also need a Matlab installation.

If you cannot install Matlab, you can install SPM standalone.

Installation

On Linux

Download the latest version here and follow the instructions on the SPM wiki.

On MacOS

Download the latest version here and follow the instructions on the SPM wiki.

Note

For systems running on MacOS Big Sur, a development version of SPM12 as well as a more recent release of the MCR (minimum 2019a) are required.

Configuration

Make sure to have the following environment variable defined:

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

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:

addpath('/path/to/your/spm12');

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');
addpath(spmhome{end-1});

Note

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

SPM12 standalone

If you want to install SPM12 without installing Matlab, you will need to install two things:

  • The Matlab runtime (often abbreviated into MCR), for which no license is required.
  • The SPM standalone itself.

Installation

You can find details on how to install these on this page.

Configuration

Note

If you followed the installation instructions, you should have set the environment variable $LD_LIBRARY_PATH.

In addition, you need to define the following environment variables:

export MCR_HOME="/path/to/your/MCR/"
export SPMSTANDALONE_HOME="/path/to/your/spmstandalone/home/"

Autocompletion

Note

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

autoload bashcompinit
bashcompinit
source ~/.bash_completion.d/python-argcomplete.sh