Setup (Linux)

Software installation

The pipeline revolves around MRtrix3 which works hand in hand with Freesurfer, FSL, and ANTs

MRtrix3

Download MRtrix3 by copy pasting this command in a bash terminal:

conda install -c mrtrix3 mrtrix3

Type an MRtrix3 command like mrconvert to check everything’s working correctly.

Add MRtrix3 to your PATH:

echo "export MRtrix3=/path/to/miniconda3/share/mrtrix3" >> .bashrc 
echo "export PATH=${MRtrix3}:$PATH" >> .bashrc

Freesurfer

  1. In your “HOME” directory (cd $HOME), download the Freesurfer installer package:

    wget https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.4.1/freesurfer-linux-ubuntu22_amd64-7.4.1.tar.gz
  2. Install it

    tar -zxpf freesurfer-linux-ubuntu22_amd64-7.4.1.tar.gz
  3. Add this to your PATH

    echo "export FREESURFER_HOME=$HOME/freesurfer" >> .bashrc
    source "$FREESURFER_HOME/SetUpFreeSurfer.sh"" >> .bashrc
  4. Get the free license online, download it in your home directory and add this command in your .bashrc:

    export FS_LICENSE=$HOME/license.txt

FSL

  1. Download the FSL installer script online. When selecting the OS to install on the download page, make sure to select Ubuntu and not Windows.

  2. Run the installer

    python3 "fslinstaller.py"
  3. Add this to your PATH

    FSLDIR=$HOME/path/to/fsl
    PATH=${FSLDIR}/share/fsl/bin:${PATH}
    export FSLDIR PATH
    . ${FSLDIR}/etc/fslconf/fsl.sh

ANTs

  1. Download the ANTs installer script

  2. In the terminal, enter:

    bash installANTs.sh
  3. Add it to your PATH

    echo "ANTSPATH=$HOME/install/bin/" >> $HOME/.bashrc 
    echo "export PATH=${ANTSPATH}:$PATH" >> $HOME/.bashrc