MRtrix3 can be installed / run through multiple avenues:
- Direct download through mechanisms tailored for different OS platforms;
- Compiled from the source code in this repository. A quick overview on how to do this is provided below, for a more comprehensive overview of the process please see here.
- Via containerisation technology using Docker or Singularity; see online documentation page for details.
Instructions on software setup and use are provided in the online documentation. Support and general discussion is hosted on the MRtrix3 Community Forum. Please also look through the Frequently Asked Questions on the wiki section of the forum. You can address all MRtrix3-related queries there, using your GitHub or Google login to post questions.
-
Install dependencies by whichever means your system uses. These include: CMake (>= 3.16), Python3, a C++ compiler with full C++17 support, Eigen (>=3.2.8), zlib, OpenGL (>=3.3), and Qt (>=5.5).
-
Clone Git repository and compile:
$ git clone https://github.com/MRtrix3/mrtrix3.git $ cd mrtrix3/ $ cmake -B build -DCMAKE_INSTALL_PREFIX=/path/to/installation/ $ cmake --build build $ cmake --install build
It's highly recommended, that you use Ninja and a compiler caching tool like ccache or sccache to speed up compilation time. You can install these tools using your package manager (e.g.
apt install ninja-build ccache
orbrew install ninja ccache
). Then, add-GNinja
to the third step above or set the environment variableCMAKE_GENERATOR
variable toNinja
.NOTE: by default MRtrix3 will build using Qt 6, but if you wish to use Qt 5 you can specify this by passing
-DMRTRIX_USE_QT5=ON
when configuring the build. -
Set the
PATH
:-
Bash shell:
edit the startup
~/.bashrc
or/etc/bash.bashrc
file manually by adding this line:$ export PATH=/path/to/installation/bin:$PATH
-
C shell:
edit the startup
~/.cshrc
or/etc/csh.cshrc
file manually by adding this line:$ setenv PATH /path/to/installation/bin:$PATH
-
-
Test installation:
Command-line:
$ mrconvert
GUI:
$ mrview
-
You can update your installation at any time by opening a terminal in the mrtrix3 folder, and typing:
git pull # Run CMake build instructions
You can build a particular release of MRtrix3 by checking out the corresponding tag, and using the same procedure as above to build it:
git checkout 3.0_RC3
# Run CMake build instructions
NOTE: if you run into configuration errors, you may need to delete CMake's internal cache and reconfigure the project. You can do this by deleting the CMakeCache.txt
file in your build directory.
Thank you for your interest in contributing to MRtrix3! Please read on here to find out how to report issues, request features and make direct contributions.