# Wiki

**URL:** https://community.mrtrix.org/c/wiki/12.md

[Latest](https://community.mrtrix.org/latest.md) · [Categories](https://community.mrtrix.org/categories.md) · [Tags](https://community.mrtrix.org/tags.md)

---

## [Registration, transformation, regridding: concepts](https://community.mrtrix.org/t/registration-transformation-regridding-concepts/3684)

<div class="topic-metadata">

**Author:** [@maxpietsch](https://community.mrtrix.org/u/maxpietsch)\
**Replies:** 0\
**Last updated:** [May 16, 2020, 5:33pm UTC](https://community.mrtrix.org/t/registration-transformation-regridding-concepts/3684 "2020-05-16T17:33:08Z")

</div>

This wiki post aims to introduce the concepts and terminology associated with modifications of the voxel grid of an image and with changing the real-world location of its content and to highlight related tools within MRt…

---

## [Registration: using transformations generated from other packages](https://community.mrtrix.org/t/registration-using-transformations-generated-from-other-packages/2259)

<div class="topic-metadata">

**Author:** [@maxpietsch](https://community.mrtrix.org/u/maxpietsch)\
**Replies:** 5\
**Last updated:** [November 23, 2023, 8:02am UTC](https://community.mrtrix.org/t/registration-using-transformations-generated-from-other-packages/2259 "2023-11-23T08:02:25Z")

</div>

The mrtransform allows the spatial transformation of images when provided with a suitable linear or nonlinear transformation (“warp”). For linear transformations, MRtrix3 uses homogeneous transformation matrices stored a…

---

## [Use of volumetric templates & parcellation atlases](https://community.mrtrix.org/t/use-of-volumetric-templates-parcellation-atlases/2253)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [February 9, 2019, 12:32pm UTC](https://community.mrtrix.org/t/use-of-volumetric-templates-parcellation-atlases/2253 "2019-02-09T12:32:00Z")

</div>

When seeking to use an atlas parcellation that is defined in the space of a volumetric template image (as opposed to e.g. the surface-based parcellations and surrounding commands provided by FreeSurfer, decisions must be…

---

## [Visualisation of streamlines terminations](https://community.mrtrix.org/t/visualisation-of-streamlines-terminations/2250)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [February 9, 2019, 12:47am UTC](https://community.mrtrix.org/t/visualisation-of-streamlines-terminations/2250 "2019-02-09T00:47:50Z")

</div>

I have on many occasions been asked about Figures 5-7 in the Anatomically-Constrained Tractography article, which demonstrate the effects that the ACT method has on the locations of streamlines terminations. There are tw…

---

## [Remote display issues](https://community.mrtrix.org/t/remote-display-issues/2547)

<div class="topic-metadata">

**Author:** [@jdtournier](https://community.mrtrix.org/u/jdtournier)\
**Replies:** 5\
**Last updated:** [July 25, 2023, 5:02pm UTC](https://community.mrtrix.org/t/remote-display-issues/2547 "2023-07-25T17:02:22Z")

</div>

The GUI components in MRtrix3 (mrview & shview) use the OpenGL 3.3 API to make full use of modern graphics cards. Unfortunately, X11 forwarding is not officially supported for OpenGL \>= 3. So it is in general not possib…

---

## [Information on software versions](https://community.mrtrix.org/t/information-on-software-versions/5091)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [August 2, 2021, 9:23am UTC](https://community.mrtrix.org/t/information-on-software-versions/5091 "2021-08-02T09:23:32Z")

</div>

The purpose of this Wiki page is to explain how the software version information works in MRtrix3, and include details that may be used in response to frequent user questions. Semantic Versioning As of the official prod…

---

## [Reconstruction of bundles of interest](https://community.mrtrix.org/t/reconstruction-of-bundles-of-interest/5729)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 4\
**Last updated:** [February 24, 2024, 3:05pm UTC](https://community.mrtrix.org/t/reconstruction-of-bundles-of-interest/5729 "2024-02-24T15:05:59Z")

</div>

When a researcher is interested specifically in one or a small number of pathways of interest, there are multiple strategies that can be employed to reconstruct and interrogate such. Each has their pros and cons. “Targe…

---

## [The MRtrix3 Python script library](https://community.mrtrix.org/t/the-mrtrix3-python-script-library/2243)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 6\
**Last updated:** [November 2, 2021, 10:59pm UTC](https://community.mrtrix.org/t/the-mrtrix3-python-script-library/2243 "2021-11-02T22:59:41Z")

</div>

In addition to the principal binary commands in MRtrix3, which are written in the C++ language, MRtrix3 also now includes a number of Python scripts for performing common image processing tasks that can be achieved thr…

---

## [Installing on Windows Subsystem for Linux (WSL)](https://community.mrtrix.org/t/installing-on-windows-subsystem-for-linux-wsl/3637)

<div class="topic-metadata">

**Author:** [@jdtournier](https://community.mrtrix.org/u/jdtournier)\
**Replies:** 4\
**Last updated:** [October 19, 2022, 11:07am UTC](https://community.mrtrix.org/t/installing-on-windows-subsystem-for-linux-wsl/3637 "2022-10-19T11:07:19Z")

</div>

Microsoft recently released the Windows subsystem for Linux (WSL), which enables you to install and run a Linux environment on Windows 10 with near-native performance. This allows Windows users to access a range of resea…

---

## [FBA post-statistical-inference tricks](https://community.mrtrix.org/t/fba-post-statistical-inference-tricks/2255)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 2\
**Last updated:** [August 2, 2021, 10:40am UTC](https://community.mrtrix.org/t/fba-post-statistical-inference-tricks/2255 "2021-08-02T10:40:13Z")

</div>

Expressing the effect size relative to controls Fibre Density (FD), and Fibre Density & Cross-section (FDC) The apparent Fibre Density (FD) and Fibre Density and Cross-section (FDC) are relative measures and have arbitra…

---

## [Handling SIFT2 weights](https://community.mrtrix.org/t/handling-sift2-weights/2242)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [February 8, 2019, 3:36am UTC](https://community.mrtrix.org/t/handling-sift2-weights/2242 "2019-02-08T03:36:13Z")

</div>

With the original tcksift command, the output is a new track file , which can subsequently be used as input to any command independently of the fact that SIFT has been applied. SIFT2 is a little trickier: the output of …

---

## [Issues with pseudotube rendering on Apple M1 macs](https://community.mrtrix.org/t/issues-with-pseudotube-rendering-on-apple-m1-macs/4505)

<div class="topic-metadata">

**Author:** [@bjeurissen](https://community.mrtrix.org/u/bjeurissen)\
**Replies:** 0\
**Last updated:** [January 24, 2021, 9:15pm UTC](https://community.mrtrix.org/t/issues-with-pseudotube-rendering-on-apple-m1-macs/4505 "2021-01-24T21:15:13Z")

</div>

While MRtrix3 works great on the new Apple M1 macs, currently, MRview’s rendering of fiber tracks as pseudotubes is subject to the following issues: crashing when loading large tractograms (containing in excess of 10K …

---

## [Linux: slow performance when handling large images](https://community.mrtrix.org/t/linux-slow-performance-when-handling-large-images/1831)

<div class="topic-metadata">

**Author:** [@jdtournier](https://community.mrtrix.org/u/jdtournier)\
**Replies:** 0\
**Last updated:** [August 9, 2018, 1:00pm UTC](https://community.mrtrix.org/t/linux-slow-performance-when-handling-large-images/1831 "2018-08-09T13:00:35Z")

</div>

Under certain circumstances, MRtrix3 commands seem to stall when handling large images, even when running operating on local files. The most likely explanation lies with the Linux kernel’s handling of dirty pages. Dirty…

---

## [Generating Track-Weighted Functional Connectivity (TW-FC) maps](https://community.mrtrix.org/t/generating-track-weighted-functional-connectivity-tw-fc-maps/2545)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 4:01pm UTC](https://community.mrtrix.org/t/generating-track-weighted-functional-connectivity-tw-fc-maps/2545 "2019-05-23T16:01:28Z")

</div>

This example demonstrates how these maps were derived, precisely as performed in the relevant NeuroImage paper. Assumes that you have a whole-brain tractogram named tracks.tck, and a 3D volume named FC\_map.mif represen…

---

## [Commands crashing due to inadequate RAM](https://community.mrtrix.org/t/commands-crashing-due-to-inadequate-ram/2553)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 5:54pm UTC](https://community.mrtrix.org/t/commands-crashing-due-to-inadequate-ram/2553 "2019-05-23T17:54:11Z")

</div>

Some commands in MRtrix3 have substantial RAM requirements, and can therefore fail even on a relatively modern machine; e.g.: tcksift and tcksift2 must store, for every streamline, a list of every fixel traversed, wit…

---

## [Standalone installation on Linux](https://community.mrtrix.org/t/standalone-installation-on-linux/3549)

<div class="topic-metadata">

**Author:** [@jdtournier](https://community.mrtrix.org/u/jdtournier)\
**Replies:** 0\
**Last updated:** [April 22, 2020, 10:06am UTC](https://community.mrtrix.org/t/standalone-installation-on-linux/3549 "2020-04-22T10:06:57Z")

</div>

In some cases, users need to install MRtrix3 on systems running older distributions, over which they have little or no control, for example centrally-managed HPC clusters. In such cases, there genuinely is no way to inst…

---

## [Non-default connectome contrasts](https://community.mrtrix.org/t/non-default-connectome-contrasts/2245)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 2\
**Last updated:** [August 23, 2021, 8:03am UTC](https://community.mrtrix.org/t/non-default-connectome-contrasts/2245 "2021-08-23T08:03:45Z")

</div>

The tck2connectome command will by default produce a connectome where the value stored in each edge corresponds to the number of streamlines ascribed to that particular pair of nodes. If individual streamline weights (as…

---

## [Installation of MRtrix3 and all its dependencies from source](https://community.mrtrix.org/t/installation-of-mrtrix3-and-all-its-dependencies-from-source/3547)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [April 21, 2020, 4:38pm UTC](https://community.mrtrix.org/t/installation-of-mrtrix3-and-all-its-dependencies-from-source/3547 "2020-04-21T16:38:11Z")

</div>

The following instructions list the steps I used to compile MRtrix3 natively on a local HPC cluster or other systems where you may not have admin access. For build instructions on your local machine, please refer to the d…

---

## [5ttgen fsl issues](https://community.mrtrix.org/t/5ttgen-fsl-issues/2252)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [February 9, 2019, 3:06am UTC](https://community.mrtrix.org/t/5ttgen-fsl-issues/2252 "2019-02-09T03:06:06Z")

</div>

FIRST failure The following error messages have frequently been observed from the 5ttgen fsl script: FSL FIRST has failed; not all structures were segmented successfully Waiting for creation of new file "first-L\_Accu\_fi…

---

## [OpenGL display issues](https://community.mrtrix.org/t/opengl-display-issues/2549)

<div class="topic-metadata">

**Author:** [@jdtournier](https://community.mrtrix.org/u/jdtournier)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 5:09pm UTC](https://community.mrtrix.org/t/opengl-display-issues/2549 "2019-05-23T17:09:32Z")

</div>

OpenGL version 3.3 not supported This will typically lead to mrview crashing with a message such as: mrview: \[ERROR\] GLSL log \[vertex shader\]: ERROR: version '330' is not supported mrview: \[ERROR\] GLSL log \[vertex shad…

---

## [Processing of HCP data](https://community.mrtrix.org/t/processing-of-hcp-data/2241)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [February 8, 2019, 2:42am UTC](https://community.mrtrix.org/t/processing-of-hcp-data/2241 "2019-02-08T02:42:04Z")

</div>

We expect that a number of users will be wanting to use MRtrix3 for the analysis of data from the Human Connectome Project (HCP). These data do however present some interesting challenges from a processing perspective.…

---

## [NIfTI transform ambiguity](https://community.mrtrix.org/t/nifti-transform-ambiguity/2254)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [February 9, 2019, 12:34pm UTC](https://community.mrtrix.org/t/nifti-transform-ambiguity/2254 "2019-02-09T12:34:17Z")

</div>

In the NIfTI & NIfTI-2 (.nii) image format, there is not one, but two items stored in the image header that provide information regarding the localisation of the image within physical space (the image transform): The “…

---

## [Unusual symbols in command outputs](https://community.mrtrix.org/t/unusual-symbols-in-command-outputs/2546)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 4:28pm UTC](https://community.mrtrix.org/t/unusual-symbols-in-command-outputs/2546 "2019-05-23T16:28:59Z")

</div>

When running MRtrix3 commands on certain terminal emulators, you may see unusual characters / sequences of characters appearing in the terminal output, that look something like the following: $ mrinfo fa.mif -debug mrin…

---

## [Linux: avoiding slow performance for piped images](https://community.mrtrix.org/t/linux-avoiding-slow-performance-for-piped-images/1830)

<div class="topic-metadata">

**Author:** [@jdtournier](https://community.mrtrix.org/u/jdtournier)\
**Replies:** 0\
**Last updated:** [August 9, 2018, 12:58pm UTC](https://community.mrtrix.org/t/linux-avoiding-slow-performance-for-piped-images/1830 "2018-08-09T12:58:41Z")

</div>

When MRtrix3 command pass data through a Unix pipe, what happens by default is that a temporary image is created, and held on the /tmp/ filesystem; the end stage of the pipe is responsible for deleting the file. This can…

---

## [Advanced debugging of MRtrix3 binaries](https://community.mrtrix.org/t/advanced-debugging-of-mrtrix3-binaries/2555)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 6:18pm UTC](https://community.mrtrix.org/t/advanced-debugging-of-mrtrix3-binaries/2555 "2019-05-23T18:18:57Z")

</div>

On rare occasions, a user may encounter a critical error (e.g. “Segmentation fault”) within an MRtrix3 command that does not give sufficient information to identify the cause of the problem, and that the developers are u…

---

## [Storage requirements of Python scripts](https://community.mrtrix.org/t/storage-requirements-of-python-scripts/2554)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 6:01pm UTC](https://community.mrtrix.org/t/storage-requirements-of-python-scripts/2554 "2019-05-23T18:01:19Z")

</div>

The Python scripts provided with MRtrix3 generate their own scratch directory in which to store various data files and image manipulations generated during their operation. In some cases - typically due to use of a tempo…

---

## [Testing different code branches](https://community.mrtrix.org/t/testing-different-code-branches/2570)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [May 30, 2019, 1:34pm UTC](https://community.mrtrix.org/t/testing-different-code-branches/2570 "2019-05-30T13:34:25Z")

</div>

There may be some circumstances in which one of the MRtrix3 developers requests / suggests using an alternative “branch” of code, in order to test a potential fix to some issue or try out some new functionality. In this …

---

## [Mrview unable to open images: "Too many open files"](https://community.mrtrix.org/t/mrview-unable-to-open-images-too-many-open-files/2550)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 5:17pm UTC](https://community.mrtrix.org/t/mrview-unable-to-open-images-too-many-open-files/2550 "2019-05-23T17:17:27Z")

</div>

It is possible to encounter this error message particularly if trying to open a large number of DICOM images. In most cases, each slice in a DICOM series is stored in an individual file; all of these files must remain op…

---

## [Setting the CPU architecture for optimal performance](https://community.mrtrix.org/t/setting-the-cpu-architecture-for-optimal-performance/3550)

<div class="topic-metadata">

**Author:** [@jdtournier](https://community.mrtrix.org/u/jdtournier)\
**Replies:** 0\
**Last updated:** [April 22, 2020, 10:24am UTC](https://community.mrtrix.org/t/setting-the-cpu-architecture-for-optimal-performance/3550 "2020-04-22T10:24:27Z")

</div>

When building from source, configure will by default cause the build script to produce generic code suitable for any current CPU. If you want to ensure optimal performance on your system, you can request that configure …

---

## [Hyperlinks to MRtrix3 online documentation](https://community.mrtrix.org/t/hyperlinks-to-mrtrix3-online-documentation/4087)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [September 14, 2020, 11:53pm UTC](https://community.mrtrix.org/t/hyperlinks-to-mrtrix3-online-documentation/4087 "2020-09-14T23:53:47Z")

</div>

The MRtrix3 online documentation is intrinsically tied to the particular version of the software. The documentation is actually stored alongside the code itself. Some changes to the code are automatically reflected i…

---

## [Compiler RAM error during build](https://community.mrtrix.org/t/compiler-ram-error-during-build/2552)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 5:46pm UTC](https://community.mrtrix.org/t/compiler-ram-error-during-build/2552 "2019-05-23T17:46:48Z")

</div>

If you encounter an error during the build process that resembles one of the following: ERROR: (#/#) \[CC\] tmp/cmd/command.o /usr/bin/g++-5.0 -c -std=c++11 -pthread -fPIC -I/home/user/mrtrix3/eigen -Wall -O2 -DNDEBUG -I…

---

## [Very slow performance when using network file system](https://community.mrtrix.org/t/very-slow-performance-when-using-network-file-system/2551)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 5:43pm UTC](https://community.mrtrix.org/t/very-slow-performance-when-using-network-file-system/2551 "2019-05-23T17:43:13Z")

</div>

When any MRtrix3 command must read or write image data, there are two primary mechanisms by which this may be performed: Memory mapping: The operating system provides access to the contents of the file as though it we…

---

## [The results of the dwifslpreproc command are different](https://community.mrtrix.org/t/the-results-of-the-dwifslpreproc-command-are-different/6925)

<div class="topic-metadata">

**Author:** [@jiahao](https://community.mrtrix.org/u/jiahao)\
**Replies:** 1\
**Last updated:** [September 5, 2023, 9:00am UTC](https://community.mrtrix.org/t/the-results-of-the-dwifslpreproc-command-are-different/6925 "2023-09-05T09:00:02Z")

</div>

Dear MRtrix experts, I have a set of data that has reversed phase encoding for all DWIs, and when I use the dwifslpreproc command(i.e.,for\_each \* : dwifslpreproc IN/all\_DWIs\_denoised\_unringed.mif IN/dwi\_denoised\_unringe…

---

## [Tcknormalise unusual results](https://community.mrtrix.org/t/tcknormalise-unusual-results/2251)

<div class="topic-metadata">

**Author:** [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Replies:** 0\
**Last updated:** [February 9, 2019, 2:56am UTC](https://community.mrtrix.org/t/tcknormalise-unusual-results/2251 "2019-02-09T02:56:13Z")

</div>

Sometimes, following the use of the tcknormalise command, an unusual effect may be observed where although the bulk of the streamlines may be aligned correctly with the target volume / space, a subset of streamlines appe…
