Installation
Below are some general quick installation instructions, mostly aimed at Unix-based systems (e.g. Linux or Apple macOS). While it’s technically possible to run MRtrix3Tissue on Windows, it’s not the most convenient or enjoyable experience. Since diffusion MRI preprocessing typically relies on FSL and/or ANTs, a Unix-based system is even more encouraged.
In addition to the below information, further OS-specific instructions are also available: Linux, macOS, Windows.
If you’ve used an older version of MRtrix3 before, such as the “release candidate 3 (RC3)”, you might want to read some release information first to inform yourself of the most critical changes in usage (e.g. name changes of certain commands).
Quick install
-
Install dependencies; these include: Python (>=2.7), a C++ compiler with full C++11 support (
g++
4.9 or later,clang++
), Eigen (>=3.3), zlib, OpenGL (>=3.3) and Qt (>=4.8 or at least 5.1 on macOS). Refer to the OS-specific instructions for details: Linux, macOS, Windows. -
Clone Git repository, configure and build:
git clone https://github.com/3Tissue/MRtrix3Tissue.git MRtrix3Tissue cd MRtrix3Tissue ./configure ./build
-
Set the
PATH
(assuming you’re using the Bash shell):Run the provided
set_path
script:./set_path
This will automatically update the
~/.bashrc
startup file (or~/.bash_profile
on macOS) for you. You can also instruct theset_path
script to explicitly update a specific startup file, e.g.:./set_path ~/.profile
You can also edit the appropriate startup file for your system manually and add this line at the end:
export PATH=/<edit as appropriate>/MRtrix3Tissue/bin:$PATH
Once you’ve run the
set_path
script or edited a startup file, you have to close and re-open a terminal for this startup file to (automatically) run and yourPATH
to be correctly set. -
Test your installation:
Command line:
mrinfo
GUI:
mrview
Keep MRtrix3Tissue up to date
-
Update your installation by opening a terminal in the MRtrix3Tissue folder, and type:
git pull ./build
-
If
./build
doesn’t work immediately, you may need to re-run theconfigure
script:./configure
and re-run
./build
again. You don’t have to update or set yourPATH
again if it was also set before.
Build a specific version of MRtrix3Tissue
You can build a specific version of MRtrix3Tissue by checking out its so-called “tag”, and using the same procedure as above to build it:
git checkout 3Tissue_v5.1.0
./configure
./build
Optimising performance
By default, the configure
script’s output instructs the build
script to produce generic code suitable for any current CPU. However, you can also have this process produce code that’s more specifically tailored to the specific CPU in your computer. As this can improve performance of your MRtrix3Tissue installation, it’s worth considering if your installation will only run on your computer (and not be moved to another computer).
To achieve this, you need to set the ARCH
environment variable to native
right before running ./configure
:
export ARCH=native
./configure
./build
Not installing the GUI
If you’re installing MRtrix3Tissue on a system where you don’t plan to use mrview
and shview
(e.g. a server, HPC system or cluster), you can avoid building these GUI tools. This also means Qt and OpenGL won’t be required.
To achieve this, you need to provide the -nogui
option to ./configure
:
./configure -nogui
./build
Problems
Problems typically call for feedback or support.