Software distribution
-
Container recipes
We now include recipe files for both Docker and Singularity within the code repository, providing an alternative mechanism for utilising the MRtrix3 software. The pre-built container is available on DockerHub.
As many will know, a number of the Python scripts provided as part of MRtrix3 invoke tools from neuroimaging softwares other than MRtrix3; and in the absence of those external tools, these scripts cannot function. These containers include only the components of those external tools that are utilized by MRtrix3 scripts; they do not provide comprehensive functional installations of those other softwares. This is achieved using NeuroDockerminify
, and reduces the total size of these containers.
If however you have an analysis pipeline that depend on many functionalities from many neuroimaging software packages, then you may prefer to instead construct a container that encapsulates all of these dependencies. The intent of these official MRtrix3 containers is to only provide container-based execution of MRtrix3 commands.
As with usage of these scripts in any other context, please ensure that the research methods and non-MRtrix3 neuroimaging software packages utilized by these scripts are appropriately cited and acknowledged.
Software-wide changes
-
Change b-value scaling for zero-length vectors
Diffusion gradient table entries with a zero-length vector but a non-zero b-value will now by default be interpreted as a b=0 volume. Note however that DWI data from Philips scanners can append to the end of a DWI series a reconstructed volume containing the mean DWI intensity, and with this change such volumes may be erroneously interpreted as a b=0 volume (a terminal warning will notify you of this assumption). -
Fixes to phase encoding handling
When exporting a phase encoding table to sidecar file(s), which is to reside alongside an image that MRtrix3 will automatically perform permutation / flipping of axes in order to approximate an axial acquisition (NIfTI / Analyse / MGH), apply those same permutations / flips to the phase encoding table, so that the data contained within will appropriately correspond to the saved image data.
This fix will primarily affect:- Anyone who has used the
mrconvert
-export_pe_table
orexport_pe_eddy
command-line options. - Anyone possessing data with phase encoding strategies other than basic polarity reversal (e.g. 4 phase encoding directions), where
dwifslpreproc
may have previously provided incorrect phase encoding information to FSL’stopup
/applytopup
/eddy
.
- Anyone who has used the
-
Transparently handle UTF-8 dashes as regular ones
(Thanks for report @mschira and others)
Ensures that commands copy-pasted into the terminal from documents where dashes have been auto-corrected to other forms of dashes will still work. -
New envvar
MRTRIX_LOGLEVEL
(Thanks for report @sebastientourbier)
This environment variable modulates the terminal verbosity of commands in the same fashion as the-quiet
/-info
/-debug
command-line options.
This capability is additionally utilized to prevent errors with Python scripts when running in an Anaconda environment and utilizing the-debug
flag. -
MGH/MGZ: Fix Colortable V2 write
MGH / MGZ images generated by newer versions of FreeSurfer, which contain “Colortable V2” data, will now have those data read correctly by MRtrix3, and MRtrix3 can write those data back to MGH / MGZ files that will be properly interpreted by FreeSurfer commands.
DICOM handling
-
Fix patient / study sorting
Explicitly sort patients and studies in a DICOM directory, rather than relying on the order in which they are read from the filesystem. -
Fix data permutation across echoes
Ensure that echo index is used to assign image data to corresponding volumes. -
Fix ordering of CMRR multi-echo data
For Siemens CMRR SMS sequence multi-echo data, ensure echoes presented as individual series are presented in correct order. -
Substantial decrease to compile time
-
Fix formatting error in dictionary
Fixes:-
0400
0564
“LOSourceOfPreviousValues
” -
0400
0565
“CSReasonForTheAttributeModification
”.
-
Multiple-command fixes
-
GLM: Fix
all_stats()
segfault
Fixes crash in specific use case where both element-wise design matrices are used, and at least one F-test is requested. -
Inference: Fix for exotic usage
Fixes case where GLM varies between elements (either due to the presence of non-finite values, or the addition of element-wise design matrix columns) and variance blocks are defined. -
Fix help page for
algorithm
module
(Thanks for report @crossmanith)
For Python scripts based on thealgorithm
module, command-line options cannot be specified before the name of the algorithm to be used; these get ignored by the command-line parser. The example usage in the documentation however violated this.
Individual command fixes
connectome2tck
:
-
Fix documented examples
Example usages erroneously invokedtck2connectome
instead ofconnectome2tck
.
dirorder
:
-
Fix segfault
(Thanks for report @mlyon)
Fixesdiroder
in the rare scenario where the number of directions is 6 or fewer.
dwi2response
:
-
python: fix handling of N/A output in
image.statistics()
(Thanks for report @GerardYu)
Prevents unhanded Python exception arising due to an empty mask. -
Fix handling of data with negative values
This simply clamps values of the input data at zero before taking their mean per-shell.
(Thanks for report @GerardYu)
dwidenoise
:
-
Limit patch size to image dimensions
(Thanks for report @jan)
Prevent command crash when size of denoising patch is larger than the size of the input image.
dwifslpreproc
:
-
Compatibility between image padding and EddyQC
(Thanks for reports @Jottoy,
Fixes usages involving the combination of an odd number of slices, use ofeddy
's slice-to-volume correction, and invocation of EddyQC. -
Fix to b=0 volume matching
(Thanks for report @Elijah)
Ignore inconsequential differences in b=0 “directions” when identifying matching DWI volumes with opposing phase encoding directions. -
Handle non-ascii data in eddy error outputs
Preventsdwifslpreproc
from crashing if the text outputs generated by failed FSL commands include non-text data. -
On
-rpe_pair
, ensure-se_epi
is 4D
(Thanks for report @dubergonzoni)
Provide a more meaningful error message if attempting to use the-rpe_pair
option but erroneously providing a 3D image. -
Fix for rare usage
Fix case where there is no phase encoding contrast present in the SE_EPI images (and hence they need to be combined with the DWI b=0 data fortopup
to possibly be applicable), and also the SE-EPI volumes are defined on a different image grid to the DWIs.
dwigradcheck
:
dwishellmath
:
-
Compatibility with one unique b-value
If provided with DWI data with only one unique b-value, still perform the requested operation rather than crashing.
for_each
:
-
Fix use of regex for entry exclusion
If passing many filesystem paths tofor_each
using wildcard(s), but a subset of those files should not be processed byfor_each
, it is possible to specify a Regular Expression via the-exclude
option to select those inputs that should be ignored.
labelconvert
:
-
labelconvert
: Error if-spine
used but absent from LUT
(Thanks for report @Lucius)
When the-spine
option is used, there should be a corresponding entry in the output lookup table called “Spinal_column
”; if absent, command now provides a more useful error message.
mrregister
:
-
Fix lmax check for nonlinear multi contrast registration
(Thanks for report @xiaobird)
mrview
:
-
Accept drop events
-
Elide ODF file names
-
Overlay: Fix segfault on bad image load
-
Deactivate pan gesture to avoid sticky movement
(Thanks for report @maedoc) -
Fix glitch in handling of clip plane selection
-
mrview
: add two new command line options for tractogram
Implements-tractography.tsf_colourmap
and-tractography.colour
options. -
Fix handling of
-focus
and-target
options- Remove erroneous warning on use of
-focus
where the x-coordinate was negative. -
-target
option can now be used multiple times.
- Remove erroneous warning on use of
-
Fix volume index reset after image switch
(Thanks for report @julien) -
fix colourmap inversion glitch in overlay tool
mtnormalise
:
-
Add resilience to non-finite values in mask
(Thanks for report @Stefanie_Tremblay)
population_template
:
-
Replace whitespace in unique filename
(Thanks for report @silver_mark)
Fix topopulation_template
to handle whitespace characters in the unique identifier parts of the input files.
tckglobal
:
-
Fix erroneous
-niter
parsing for values bigger that 1.4e9
Allowstckglobal
to be run with more than1410065408
iterations. -
Fix bug that caused erroneous duplication of particles