List of MRtrix3 commands

5tt2gmwmi

Synopsis

5tt2gmwmi [ options ]  5tt_in mask_out
  • 5tt_in: the input 5TT segmented anatomical image
  • mask_out: the output mask image

Description

Generate a mask image appropriate for seeding streamlines on the grey matter - white matter interface

Options

  • -mask_in image Filter an input mask image according to those voxels that lie upon the grey matter - white matter boundary. If no input mask is provided, the output will be a whole-brain mask image calculated using the anatomical image only.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

Smith, R. E.; Tournier, J.-D.; Calamante, F. & Connelly, A. Anatomically-constrained tractography:Improved diffusion MRI streamlines tractography through effective use of anatomical information. NeuroImage, 2012, 62, 1924-1938


Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


5tt2vis

Synopsis

5tt2vis [ options ]  input output
  • input: the input 4D tissue-segmented image
  • output: the output 3D image for visualisation

Description

generate an image for visualisation purposes from an ACT 5TT segmented anatomical image

Options

  • -bg value image intensity of background (default: 0)
  • -cgm value image intensity of cortical grey matter (default: 0.5)
  • -sgm value image intensity of sub-cortical grey matter (default: 0.75)
  • -wm value image intensity of white matter (default: 1)
  • -csf value image intensity of CSF (default: 0.15)
  • -path value image intensity of pathological tissue (default: 2)

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


5ttedit

Synopsis

5ttedit [ options ]  input output
  • input: the 5TT image to be modified
  • output: the output modified 5TT image

Description

manually set the partial volume fractions in an ACT five-tissue-type (5TT) image using mask images

Options

  • -cgm image provide a mask of voxels that should be set to cortical grey matter
  • -sgm image provide a mask of voxels that should be set to sub-cortical grey matter
  • -wm image provide a mask of voxels that should be set to white matter
  • -csf image provide a mask of voxels that should be set to CSF
  • -path image provide a mask of voxels that should be set to pathological tissue
  • -none image provide a mask of voxels that should be cleared (i.e. are non-brain); note that this will supersede all other provided masks

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


afdconnectivity

Synopsis

afdconnectivity [ options ]  image tracks
  • image: the input FOD image.
  • tracks: the input track file defining the bundle of interest.

Description

obtain an estimate of fibre connectivity between two regions using AFD and streamlines tractography

This estimate is obtained by determining a fibre volume (AFD) occupied by the pathway of interest, and dividing by the streamline length.

If only the streamlines belonging to the pathway of interest are provided, then ALL of the fibre volume within each fixel selected will contribute to the result. If the -wbft option is used to provide whole-brain fibre-tracking (of which the pathway of interest should contain a subset), only the fraction of the fibre volume in each fixel estimated to belong to the pathway of interest will contribute to the result.

Use -quiet to suppress progress messages and output fibre connectivity value only.

For valid comparisons of AFD connectivity across scans, images MUST be intensity normalised and bias field corrected, and a common response function for all subjects must be used.

Note that the sum of the AFD is normalised by streamline length to account for subject differences in fibre bundle length. This normalisation results in a measure that is more related to the cross-sectional volume of the tract (and therefore ‘connectivity’). Note that SIFT-ed tract count is a superior measure because it is unaffected by tangential yet unrelated fibres. However, AFD connectivity may be used as a substitute when Anatomically Constrained Tractography is not possible due to uncorrectable EPI distortions, and SIFT may therefore not be as effective.

Options

  • -wbft tracks provide a whole-brain fibre-tracking data set (of which the input track file should be a subset), to improve the estimate of fibre bundle volume in the presence of partial volume
  • -afd_map image output a 3D image containing the AFD estimated for each voxel.
  • -all_fixels if whole-brain fibre-tracking is NOT provided, then if multiple fixels within a voxel are traversed by the pathway of interest, by default the fixel with the greatest streamlines density is selected to contribute to the AFD in that voxel. If this option is provided, then ALL fixels with non-zero streamlines density will contribute to the result, even if multiple fixels per voxel are selected.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au) and Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


amp2sh

Synopsis

amp2sh [ options ]  amp SH
  • amp: the input amplitude image.
  • SH: the output spherical harmonics coefficients image.

Description

convert a set of amplitudes (defined along a set of corresponding directions) to their spherical harmonic representation. The spherical harmonic decomposition is calculated by least-squares linear fitting.

The directions can be defined either as a DW gradient scheme (for example to compute the SH representation of the DW signal) or a set of [az el] pairs as output by the dirgen command. The DW gradient scheme or direction set can be supplied within the input image header or using the -gradient or -directions option. Note that if a direction set and DW gradient scheme can be found, the direction set will be used by default.

Note that this program makes use of implied symmetries in the diffusion profile. First, the fact the signal attenuation profile is real implies that it has conjugate symmetry, i.e. Y(l,-m) = Y(l,m)* (where * denotes the complex conjugate). Second, the diffusion profile should be antipodally symmetric (i.e. S(x) = S(-x)), implying that all odd l components should be zero. Therefore, this program only computes the even elements.

Note that the spherical harmonics equations used here differ slightly from those conventionally used, in that the (-1)^m factor has been omitted. This should be taken into account in all subsequent calculations.

The spherical harmonic coefficients are stored as follows. First, since the signal attenuation profile is real, it has conjugate symmetry, i.e. Y(l,-m) = Y(l,m)* (where * denotes the complex conjugate). Second, the diffusion profile should be antipodally symmetric (i.e. S(x) = S(-x)), implying that all odd l components should be zero. Therefore, only the even elements are computed. Note that the spherical harmonics equations used here differ slightly from those conventionally used, in that the (-1)^m factor has been omitted. This should be taken into account in all subsequent calculations. Each volume in the output image corresponds to a different spherical harmonic component. Each volume will correspond to the following: volume 0: l = 0, m = 0 ; volume 1: l = 2, m = -2 (imaginary part of m=2 SH) ; volume 2: l = 2, m = -1 (imaginary part of m=1 SH) ; volume 3: l = 2, m = 0 ; volume 4: l = 2, m = 1 (real part of m=1 SH) ; volume 5: l = 2, m = 2 (real part of m=2 SH) ; etc...

Options

  • -lmax order set the maximum harmonic order for the output series. By default, the program will use the highest possible lmax given the number of diffusion-weighted images, up to a maximum of 8.
  • -normalise normalise the DW signal to the b=0 image
  • -directions file the directions corresponding to the input amplitude image used to sample AFD. By default this option is not required providing the direction set is supplied in the amplitude image. This should be supplied as a list of directions [az el], as generated using the dirgen command
  • -rician noise correct for Rician noise induced bias, using noise map supplied

DW gradient table import options

  • -grad encoding specify the diffusion-weighted gradient scheme used in the acquisition. The program will normally attempt to use the encoding stored in the image header. This should be supplied as a 4xN text file with each line is in the format [ X Y Z b ], where [ X Y Z ] describe the direction of the applied gradient, and b gives the b-value in units of s/mm^2.
  • -fslgrad bvecs bvals specify the diffusion-weighted gradient scheme used in the acquisition in FSL bvecs/bvals format.
  • -bvalue_scaling mode specifies whether the b-values should be scaled by the square of the corresponding DW gradient norm, as often required for multi-shell or DSI DW acquisition schemes. The default action can also be set in the MRtrix config file, under the BValueScaling entry. Valid choices are yes/no, true/false, 0/1 (default: true).

DW Shell selection options

  • -shell list specify one or more diffusion-weighted gradient shells to use during processing, as a comma-separated list of the desired approximate b-values. Note that some commands are incompatible with multiple shells, and will throw an error if more than one b-value is provided.

Stride options

  • -stride spec specify the strides of the output data in memory, as a comma-separated list. The actual strides produced will depend on whether the output image format can support it.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


connectome2tck

Synopsis

connectome2tck [ options ]  tracks_in assignments_in prefix_out
  • tracks_in: the input track file
  • assignments_in: text file containing the node assignments for each streamline
  • prefix_out: the output file / prefix

Description

extract streamlines from a tractogram based on their assignment to parcellated nodes

Options

Options for determining the content / format of output files

  • -nodes list only select tracks that involve a set of nodes of interest (provide as a comma-separated list of integers)
  • -exclusive only select tracks that exclusively connect nodes from within the list of nodes of interest
  • -files option select how the resulting streamlines will be grouped in output files. Options are: per_edge, per_node, single (default: per_edge)
  • -exemplars image generate a mean connection exemplar per edge, rather than keeping all streamlines (the parcellation node image must be provided in order to constrain the exemplar endpoints)
  • -keep_unassigned by default, the program discards those streamlines that are not successfully assigned to a node. Set this option to generate corresponding outputs containing these streamlines (labelled as node index 0)
  • -keep_self by default, the program will not output streamlines that connect to the same node at both ends. Set this option to instead keep these self-connections.

Options for importing / exporting streamline weights

  • -tck_weights_in path specify a text scalar file containing the streamline weights
  • -prefix_tck_weights_out prefix provide a prefix for outputting a text file corresponding to each output file, each containing only the streamline weights relevant for that track file

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


dcmedit

Synopsis

dcmedit [ options ]  file
  • file: the DICOM file to be edited.

Description

Edit DICOM file in-place. Note that this simply replaces the existing values without modifying the DICOM structure in any way. Replacement text will be truncated if it is too long to fit inside the existing tag.

WARNING: this command will modify existing data! It is recommended to run this command on a copy of the original data set to avoid loss of data.

Options

  • -anonymise remove any identifiable information, by replacing the following tags: - any tag with Value Representation PN will be replaced with ‘anonymous’ - tag (0010,0030) PatientBirthDate will be replaced with an empty stringWARNING: there is no guarantee that this command will remove all identiable information, since such information may be contained in any number of private vendor-specific tags. You will need to double-check the results independently if you need to ensure anonymity.
  • -id text replace all ID tags with string supplied. This consists of tags (0010, 0020) PatientID and (0010, 1000) OtherPatientIDs
  • -tag group element newvalue replace specific tag.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


dcminfo

Synopsis

dcminfo [ options ]  file
  • file: the DICOM file to be scanned.

Description

output DICOM fields in human-readable format.

Options

  • -all print all DICOM fields.
  • -csa print all Siemens CSA fields
  • -tag group element print field specified by the group & element tags supplied. Tags should be supplied as Hexadecimal (i.e. as they appear in the -all listing).

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


dirflip

Synopsis

dirflip [ options ]  in out
  • in: the input files for the directions.
  • out: the output files for the directions.

Description

optimise the polarity of the directions in a scheme with respect to a unipolar electrostatic repulsion model, by inversion of individual directions. The orientations themselves are not affected, only their polarity. This is necessary to ensure near-optimal distribution of DW directions for eddy-current correction.

Options

  • -permutations num number of permutations to try.
  • -cartesian Output the directions in Cartesian coordinates [x y z] instead of [az el].

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


dirgen

Synopsis

dirgen [ options ]  ndir dirs
  • ndir: the number of directions to generate.
  • dirs: the text file to write the directions to, as [ az el ] pairs.

Description

generate a set of uniformly distributed directions using a bipolar electrostatic repulsion model.

Options

  • -power exp specify exponent to use for repulsion power law (default: 2). This must be a power of 2 (i.e. 2, 4, 8, 16, ...).
  • -niter num specify the maximum number of iterations to perform (default: 10000).
  • -unipolar optimise assuming a unipolar electrostatic repulsion model rather than the bipolar model normally assumed in DWI
  • -cartesian Output the directions in Cartesian coordinates [x y z] instead of [az el].

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

Jones, D.; Horsfield, M. & Simmons, A. Optimal strategies for measuring diffusion in anisotropic systems by magnetic resonance imaging. Magnetic Resonance in Medicine, 1999, 42: 515-525

Papadakis, N. G.; Murrills, C. D.; Hall, L. D.; Huang, C. L.-H. & Adrian Carpenter, T. Minimal gradient encoding for robust estimation of diffusion anisotropy. Magnetic Resonance Imaging, 2000, 18: 671-679


Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


dirmerge

Synopsis

dirmerge [ options ]  subsets bvalue files [ bvalue files ... ] out
  • subsets: the number of subsets (phase-encode directions) per b-value
  • bvalue files: the b-value and sets of corresponding files, in order
  • out: the output directions file, with each row listing the X Y Z gradient directions, the b-value, and an index representing the phase encode direction

Description

splice or merge sets of directions over multiple shells into a single set, in such a way as to maintain near-optimality upon truncation.

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


dirorder

Synopsis

dirorder [ options ]  input output
  • input: the input directions file
  • output: the output directions file

Description

reorder a set of directions to ensure near-uniformity upon truncation - i.e. if the scan is terminated early, the acquired directions are still close to optimal

Options

  • -cartesian Output the directions in Cartesian coordinates [x y z] instead of [az el].

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


dirsplit

Synopsis

dirsplit [ options ]  dirs out [ out ... ]
  • dirs: the text file containing the directions.
  • out: the output partitioned directions

Description

split a set of evenly distributed directions (as generated by dirgen) into approximately uniformly distributed subsets.

Options

  • -permutations num number of permutations to try
  • -cartesian Output the directions in Cartesian coordinates [x y z] instead of [az el].

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


dirstat

Synopsis

dirstat [ options ]  dirs
  • dirs: the text file containing the directions.

Description

report statistics on a direction set

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


dwi2adc

Synopsis

dwi2adc [ options ]  input output
  • input: the input image.
  • output: the output image.

Description

convert mean dwi (trace-weighted) images to mean adc maps

Options

DW gradient table import options

  • -grad encoding specify the diffusion-weighted gradient scheme used in the acquisition. The program will normally attempt to use the encoding stored in the image header. This should be supplied as a 4xN text file with each line is in the format [ X Y Z b ], where [ X Y Z ] describe the direction of the applied gradient, and b gives the b-value in units of s/mm^2.
  • -fslgrad bvecs bvals specify the diffusion-weighted gradient scheme used in the acquisition in FSL bvecs/bvals format.
  • -bvalue_scaling mode specifies whether the b-values should be scaled by the square of the corresponding DW gradient norm, as often required for multi-shell or DSI DW acquisition schemes. The default action can also be set in the MRtrix config file, under the BValueScaling entry. Valid choices are yes/no, true/false, 0/1 (default: true).

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


dwi2fod

Synopsis

dwi2fod [ options ]  algorithm dwi response odf [ response odf ... ]
  • algorithm: the algorithm to use for FOD estimation. (options are: csd,msmt_csd)
  • dwi: the input diffusion-weighted image
  • response odf: pairs of input tissue response and output ODF images

Description

estimate fibre orientation distributions from diffusion data using spherical deconvolution.

The spherical harmonic coefficients are stored as follows. First, since the signal attenuation profile is real, it has conjugate symmetry, i.e. Y(l,-m) = Y(l,m)* (where * denotes the complex conjugate). Second, the diffusion profile should be antipodally symmetric (i.e. S(x) = S(-x)), implying that all odd l components should be zero. Therefore, only the even elements are computed. Note that the spherical harmonics equations used here differ slightly from those conventionally used, in that the (-1)^m factor has been omitted. This should be taken into account in all subsequent calculations. Each volume in the output image corresponds to a different spherical harmonic component. Each volume will correspond to the following: volume 0: l = 0, m = 0 ; volume 1: l = 2, m = -2 (imaginary part of m=2 SH) ; volume 2: l = 2, m = -1 (imaginary part of m=1 SH) ; volume 3: l = 2, m = 0 ; volume 4: l = 2, m = 1 (real part of m=1 SH) ; volume 5: l = 2, m = 2 (real part of m=2 SH) ; etc...

Options

DW gradient table import options

  • -grad encoding specify the diffusion-weighted gradient scheme used in the acquisition. The program will normally attempt to use the encoding stored in the image header. This should be supplied as a 4xN text file with each line is in the format [ X Y Z b ], where [ X Y Z ] describe the direction of the applied gradient, and b gives the b-value in units of s/mm^2.
  • -fslgrad bvecs bvals specify the diffusion-weighted gradient scheme used in the acquisition in FSL bvecs/bvals format.
  • -bvalue_scaling mode specifies whether the b-values should be scaled by the square of the corresponding DW gradient norm, as often required for multi-shell or DSI DW acquisition schemes. The default action can also be set in the MRtrix config file, under the BValueScaling entry. Valid choices are yes/no, true/false, 0/1 (default: true).

DW Shell selection options

  • -shell list specify one or more diffusion-weighted gradient shells to use during processing, as a comma-separated list of the desired approximate b-values. Note that some commands are incompatible with multiple shells, and will throw an error if more than one b-value is provided.

Options common to more than one algorithm

  • -directions file specify the directions over which to apply the non-negativity constraint (by default, the built-in 300 direction set is used). These should be supplied as a text file containing [ az el ] pairs for the directions.
  • -lmax order the maximum spherical harmonic order for the output FOD(s).For algorithms with multiple outputs, this should be provided as a comma-separated list of integers, one for each output image; for single-output algorithms, only a single integer should be provided. If omitted, the command will use the highest possible lmax given the diffusion gradient table, up to a maximum of 8.
  • -mask image only perform computation within the specified binary brain mask image.

Options for the Constrained Spherical Deconvolution algorithm

  • -filter spec the linear frequency filtering parameters used for the initial linear spherical deconvolution step (default = [ 1 1 1 0 0 ]). These should be supplied as a text file containing the filtering coefficients for each even harmonic order.
  • -neg_lambda value the regularisation parameter lambda that controls the strength of the non-negativity constraint (default = 1).
  • -norm_lambda value the regularisation parameter lambda that controls the strength of the constraint on the norm of the solution (default = 1).
  • -threshold value the threshold below which the amplitude of the FOD is assumed to be zero, expressed as an absolute amplitude (default = 0).
  • -niter number the maximum number of iterations to perform for each voxel (default = 50). Use ‘-niter 0’ for a linear unconstrained spherical deconvolution.

Stride options

  • -stride spec specify the strides of the output data in memory, as a comma-separated list. The actual strides produced will depend on whether the output image format can support it.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

  • If using csd algorithm:Tournier, J.-D.; Calamante, F. & Connelly, A. Robust determination of the fibre orientation distribution in diffusion MRI: Non-negativity constrained super-resolved spherical deconvolution. NeuroImage, 2007, 35, 1459-1472
  • If using msmt_csd algorithm:Jeurissen, B; Tournier, J-D; Dhollander, T; Connelly, A & Sijbers, J. Multi-tissue constrained spherical deconvolution for improved analysis of multi-shell diffusion MRI data NeuroImage, 2014, 103, 411-426

Tournier, J.-D.; Calamante, F., Gadian, D.G. & Connelly, A. Direct estimation of the fiber orientation density function from diffusion-weighted MRI data using spherical deconvolution.NeuroImage, 2004, 23, 1176-1185


Author: J-Donald Tournier (jdtournier@gmail.com) and Ben Jeurissen (ben.jeurissen@uantwerpen.be)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


dwi2mask

Synopsis

dwi2mask [ options ]  image image
  • image: the input DWI image containing volumes that are both diffusion weighted and b=0
  • image: the output whole brain mask image

Description

Generates an whole brain mask from a DWI image.All diffusion weighted and b=0 volumes are used to obtain a mask that includes both brain tissue and CSF.

Options

DW gradient table import options

  • -grad encoding specify the diffusion-weighted gradient scheme used in the acquisition. The program will normally attempt to use the encoding stored in the image header. This should be supplied as a 4xN text file with each line is in the format [ X Y Z b ], where [ X Y Z ] describe the direction of the applied gradient, and b gives the b-value in units of s/mm^2.
  • -fslgrad bvecs bvals specify the diffusion-weighted gradient scheme used in the acquisition in FSL bvecs/bvals format.
  • -bvalue_scaling mode specifies whether the b-values should be scaled by the square of the corresponding DW gradient norm, as often required for multi-shell or DSI DW acquisition schemes. The default action can also be set in the MRtrix config file, under the BValueScaling entry. Valid choices are yes/no, true/false, 0/1 (default: true).

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


dwi2noise

Synopsis

dwi2noise [ options ]  dwi noise
  • dwi: the input diffusion-weighted image.
  • noise: the output noise map

Description

estimate noise level voxel-wise using residuals from a truncated SH fit

WARNING: This command is deprecated and may be removed in future releases. Try using the dwidenoise command with the -noise option instead.

Options

  • -lmax order set the maximum harmonic order for the output series. By default, the program will use the highest possible lmax given the number of diffusion-weighted images, up to a maximum of 8.

DW gradient table import options

  • -grad encoding specify the diffusion-weighted gradient scheme used in the acquisition. The program will normally attempt to use the encoding stored in the image header. This should be supplied as a 4xN text file with each line is in the format [ X Y Z b ], where [ X Y Z ] describe the direction of the applied gradient, and b gives the b-value in units of s/mm^2.
  • -fslgrad bvecs bvals specify the diffusion-weighted gradient scheme used in the acquisition in FSL bvecs/bvals format.
  • -bvalue_scaling mode specifies whether the b-values should be scaled by the square of the corresponding DW gradient norm, as often required for multi-shell or DSI DW acquisition schemes. The default action can also be set in the MRtrix config file, under the BValueScaling entry. Valid choices are yes/no, true/false, 0/1 (default: true).

DW Shell selection options

  • -shell list specify one or more diffusion-weighted gradient shells to use during processing, as a comma-separated list of the desired approximate b-values. Note that some commands are incompatible with multiple shells, and will throw an error if more than one b-value is provided.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


dwi2tensor

Synopsis

dwi2tensor [ options ]  dwi dt
  • dwi: the input dwi image.
  • dt: the output dt image.

Description

Diffusion (kurtosis) tensor estimation using iteratively reweighted linear least squares estimator.

The tensor coefficients are stored in the output image as follows: volumes 0-5: D11, D22, D33, D12, D13, D23 ; If diffusion kurtosis is estimated using the -dkt option, these are stored as follows: volumes 0-2: W1111, W2222, W3333 ; volumes 3-8: W1112, W1113, W1222, W1333, W2223, W2333 ; volumes 9-11: W1122, W1133, W2233 ; volumes 12-14: W1123, W1223, W1233 ;

Options

  • -mask image only perform computation within the specified binary brain mask image.
  • -b0 image the output b0 image.
  • -dkt image the output dkt image.
  • -iter integer number of iterative reweightings (default: 2); set to 0 for ordinary linear least squares.
  • -predicted_signal image the predicted dwi image.

DW gradient table import options

  • -grad encoding specify the diffusion-weighted gradient scheme used in the acquisition. The program will normally attempt to use the encoding stored in the image header. This should be supplied as a 4xN text file with each line is in the format [ X Y Z b ], where [ X Y Z ] describe the direction of the applied gradient, and b gives the b-value in units of s/mm^2.
  • -fslgrad bvecs bvals specify the diffusion-weighted gradient scheme used in the acquisition in FSL bvecs/bvals format.
  • -bvalue_scaling mode specifies whether the b-values should be scaled by the square of the corresponding DW gradient norm, as often required for multi-shell or DSI DW acquisition schemes. The default action can also be set in the MRtrix config file, under the BValueScaling entry. Valid choices are yes/no, true/false, 0/1 (default: true).

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

Veraart, J.; Sijbers, J.; Sunaert, S.; Leemans, A. & Jeurissen, B. Weighted linear least squares estimation of diffusion MRI parameters: strengths, limitations, and pitfalls. NeuroImage, 2013, 81, 335-346


Author: Ben Jeurissen (ben.jeurissen@uantwerpen.be)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


dwidenoise

Synopsis

dwidenoise [ options ]  dwi out
  • dwi: the input diffusion-weighted image.
  • out: the output denoised DWI image.

Description

Denoise DWI data and estimate the noise level based on the optimal threshold for PCA.

DWI data denoising and noise map estimation by exploiting data redundancy in the PCA domain using the prior knowledge that the eigenspectrum of random covariance matrices is described by the universal Marchenko Pastur distribution.

Important note: image denoising must be performed as the first step of the image processing pipeline. The routine will fail if interpolation or smoothing has been applied to the data prior to denoising.

Note that this function does not correct for non-Gaussian noise biases.

Options

  • -mask image only perform computation within the specified binary brain mask image.
  • -extent window set the window size of the denoising filter. (default = 5,5,5)
  • -noise level the output noise map.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

Veraart, J.; Fieremans, E. & Novikov, D.S. Diffusion MRI noise mapping using random matrix theory Magn. Res. Med., 2016, early view, doi: 10.1002/mrm.26059


Author: Daan Christiaens (daan.christiaens@kuleuven.be) & Jelle Veraart (jelle.veraart@nyumc.org) & J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2016 New York University, University of Antwerp, and the MRtrix3 contributors

Permission is hereby granted, free of charge, to any non-commercial entity (‘Recipient’) obtaining a copy of this software and associated documentation files (the ‘Software’), to the Software solely for non-commercial research, including the rights to use, copy and modify the Software, subject to the following conditions:

  1. The above copyright notice and this permission notice shall be included by Recipient in all copies or substantial portions of the Software.
  2. THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIESOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BELIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF ORIN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  3. In no event shall NYU be liable for direct, indirect, special, incidental or consequential damages in connection with the Software. Recipient will defend, indemnify and hold NYU harmless from any claims or liability resulting from the use of the Software by recipient.
  4. Neither anything contained herein nor the delivery of the Software to recipient shall be deemed to grant the Recipient any right or licenses under any patents or patent application owned by NYU.
  5. The Software may only be used for non-commercial research and may not be used for clinical care.
  6. Any publication by Recipient of research involving the Software shall cite the references listed below.

dwiextract

Synopsis

dwiextract [ options ]  input output
  • input: the input DW image.
  • output: the output image (diffusion-weighted volumes by default.

Description

Extract either diffusion-weighted volumes or b=0 volumes from an image containing both

Options

  • -bzero output b=0 volumes instead of the diffusion weighted volumes.

DW gradient table import options

  • -grad encoding specify the diffusion-weighted gradient scheme used in the acquisition. The program will normally attempt to use the encoding stored in the image header. This should be supplied as a 4xN text file with each line is in the format [ X Y Z b ], where [ X Y Z ] describe the direction of the applied gradient, and b gives the b-value in units of s/mm^2.
  • -fslgrad bvecs bvals specify the diffusion-weighted gradient scheme used in the acquisition in FSL bvecs/bvals format.
  • -bvalue_scaling mode specifies whether the b-values should be scaled by the square of the corresponding DW gradient norm, as often required for multi-shell or DSI DW acquisition schemes. The default action can also be set in the MRtrix config file, under the BValueScaling entry. Valid choices are yes/no, true/false, 0/1 (default: true).

DW Shell selection options

  • -shell list specify one or more diffusion-weighted gradient shells to use during processing, as a comma-separated list of the desired approximate b-values. Note that some commands are incompatible with multiple shells, and will throw an error if more than one b-value is provided.

Stride options

  • -stride spec specify the strides of the output data in memory, as a comma-separated list. The actual strides produced will depend on whether the output image format can support it.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


dwinormalise

Synopsis

dwinormalise [ options ]  input mask output
  • input: the input DWI image containing volumes that are both diffusion weighted and b=0
  • mask: the input mask image used to normalise the intensity
  • output: the output DWI intensity normalised image

Description

Intensity normalise the b=0 signal within a supplied white matter mask

Options

  • -intensity value normalise the b=0 signal to the specified value (Default: 1e+03)
  • -percentile value define the percentile of the mask intensties used for normalisation. If this option is not supplied then the median value (50th percentile) will be normalised to the desired intensity value.

DW gradient table import options

  • -grad encoding specify the diffusion-weighted gradient scheme used in the acquisition. The program will normally attempt to use the encoding stored in the image header. This should be supplied as a 4xN text file with each line is in the format [ X Y Z b ], where [ X Y Z ] describe the direction of the applied gradient, and b gives the b-value in units of s/mm^2.
  • -fslgrad bvecs bvals specify the diffusion-weighted gradient scheme used in the acquisition in FSL bvecs/bvals format.
  • -bvalue_scaling mode specifies whether the b-values should be scaled by the square of the corresponding DW gradient norm, as often required for multi-shell or DSI DW acquisition schemes. The default action can also be set in the MRtrix config file, under the BValueScaling entry. Valid choices are yes/no, true/false, 0/1 (default: true).

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


fixel2sh

Synopsis

fixel2sh [ options ]  fixel_in sh_out
  • fixel_in: the input sparse fixel image.
  • sh_out: the output sh image.

Description

convert a fixel-based sparse-data image into an SH image that can be visually evaluated using MRview

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


fixel2tsf

Synopsis

fixel2tsf [ options ]  fixel_in tracks tsf
  • fixel_in: the input fixel image
  • tracks: the input track file
  • tsf: the output track scalar file

Description

Map fixel values to a track scalar file based on an input tractogram. This is useful for visualising the output from fixelcfestats in 3D.

Options

  • -angle value the max anglular threshold for computing correspondence between a fixel direction and track tangent (default = 30 degrees)

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


fixel2voxel

Synopsis

fixel2voxel [ options ]  fixel_in operation image_out
  • fixel_in: the input sparse fixel image.
  • operation: the operation to apply, one of: mean, sum, product, rms, var, std, min, max, absmax, magmax, count, complexity, sf, dec_unit, dec_scaled, split_size, split_value, split_dir.
  • image_out: the output scalar image.

Description

convert a fixel-based sparse-data image into some form of scalar image. This could be: - Some statistic computed across all fixel values within a voxel: mean, sum, product, rms, var, std, min, max, absmax, magmax- The number of fixels in each voxel: count- Some measure of crossing-fibre organisation: complexity, sf (‘single-fibre’)- A 4D directionally-encoded colour image: dec_unit, dec_scaled- A 4D scalar image with one 3D volume per fixel: split_size, split_value- A 4D image with three 3D volumes per fixel direction: split_dir

Options

  • -weighted weight the contribution of each fixel to the per-voxel result according to its volume (note that this option is not applicable for all operations, and should be avoided if the value stored in the fixel image is itself the estimated fibre volume)

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

  • Reference for ‘complexity’ operation:Riffert, T. W.; Schreiber, J.; Anwander, A. & Knosche, T. R. Beyond Fractional Anisotropy: Extraction of bundle-specific structural metrics from crossing fibre models. NeuroImage, 2014 (in press)

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


fixelcalc

Synopsis

fixelcalc [ options ]  input1 operation input2 output
  • input1: the input fixel image.
  • operation: the type of operation to be applied (either add, sub, mult or divide)
  • input2: the input fixel image.
  • output: the output fixel image.

Description

Perform basic calculations (add, subtract, multiply, divide) between two fixel images

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


fixelcfestats

Synopsis

fixelcfestats [ options ]  input template design contrast tracks output
  • input: a text file listing the file names of the input fixel images
  • template: the fixel mask used to define fixels of interest. This can be generated by thresholding the group average AFD fixel image.
  • design: the design matrix. Note that a column of 1’s will need to be added for correlations.
  • contrast: the contrast vector, specified as a single row of weights
  • tracks: the tracks used to determine fixel-fixel connectivity
  • output: the filename prefix for all output.

Description

Fixel-based analysis using connectivity-based fixel enhancement and non-parametric permutation testing.

Options

  • -notest don’t perform permutation testing and only output population statistics (effect size, stdev etc)
  • -negative automatically test the negative (opposite) contrast. By computing the opposite contrast simultaneously the computation time is reduced.
  • -nperms num the number of permutations (default: 5000).
  • -cfe_dh value the height increment used in the cfe integration (default: 0.1)
  • -cfe_e value cfe extent exponent (default: 2)
  • -cfe_h value cfe height exponent (default: 3)
  • -cfe_c value cfe connectivity exponent (default: 0.5)
  • -angle value the max angle threshold for computing inter-subject fixel correspondence (Default: 30 degrees)
  • -connectivity threshold a threshold to define the required fraction of shared connections to be included in the neighbourhood (default: 0.01)
  • -smooth FWHM smooth the fixel value along the fibre tracts using a Gaussian kernel with the supplied FWHM (default: 10mm)
  • -nonstationary do adjustment for non-stationarity
  • -nperms_nonstationary num the number of permutations used when precomputing the empirical statistic image for nonstationary correction (Default: 5000)

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

Raffelt, D.; Smith, RE.; Ridgway, GR.; Tournier, JD.; Vaughan, DN.; Rose, S.; Henderson, R.; Connelly, A.Connectivity-based fixel enhancement: Whole-brain statistical analysis of diffusion MRI measures in the presence of crossing fibres. Neuroimage, 2015, 15(117):40-55

  • If using the -nonstationary option: Salimi-Khorshidi, G. Smith, S.M. Nichols, T.E. Adjusting the effect of nonstationarity in cluster-based and TFCE inference. NeuroImage, 2011, 54(3), 2006-19

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


fixelcorrespondence

Synopsis

fixelcorrespondence [ options ]  subject template output
  • subject: the input subject fixel image.
  • template: the input template fixel image.
  • output: the output fixel image.

Description

Obtain angular correpondence by mapping subject fixels to a template fixel mask. It is assumed that the subject image has already been spatially normalised and is aligned with the template.

Options

  • -angle value the max angle threshold for computing inter-subject fixel correspondence (Default: 30 degrees)

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


fixellog

Synopsis

fixellog [ options ]  input output
  • input: the input fixel image.
  • output: the output fixel image.

Description

compute the natural logarithm of all values in a fixel image

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


fixelreorient

Synopsis

fixelreorient [ options ]  input warp output
  • input: the input fixel image.
  • warp: a 4D deformation field used to perform reorientation. Reorientation is performed by applying the Jacobian affine transform in each voxel in the warp, then re-normalising the vector representing the fixel direction
  • output: the output fixel image.

Description

Reorient fixel directions using the local affine transformation (Jacobian matrix) of an input warp.

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


fixelstats

Synopsis

fixelstats [ options ]  input
  • input: the input fixel image.

Description

Compute fixel image statistics

Options

Statistics options

  • -output field output only the field specified. Multiple such options can be supplied if required. Choices are: mean, median, std, min, max, count. Useful for use in scripts.
  • -mask image only perform computation within the specified binary mask image.
  • -histogram file generate histogram of intensities and store in specified text file. Note that the first line of the histogram gives the centre of the bins.
  • -bins num the number of bins to use to generate the histogram (default = 100).
  • -dump file dump the voxel intensities to a text file.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


fixelthreshold

Synopsis

fixelthreshold [ options ]  fixel_in threshold fixel_out
  • fixel_in: the input fixel image.
  • threshold: the input threshold
  • fixel_out: the output fixel image

Description

Threshold the values in a fixel image

Options

  • -crop remove fixels that fall below threshold (instead of assigning their value to zero or one)
  • -invert invert the output image (i.e. below threshold fixels are included instead)

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


fod2dec

Synopsis

fod2dec [ options ]  input output
  • input: The input FOD image (spherical harmonic coefficients).
  • output: The output DEC image (weighted RGB triplets).

Description

Generate FOD-based DEC maps, with optional panchromatic sharpening and/or luminance/perception correction.

By default, the FOD-based DEC is weighted by the integral of the FOD. To weight by another scalar map, use the outputmap option. This option can also be used for panchromatic sharpening, e.g., by supplying a T1 (or other sensible) anatomical volume with a higher spatial resolution.

Options

  • -mask image Only perform DEC computation within the specified mask image.
  • -threshold value FOD amplitudes below the threshold value are considered zero.
  • -outputmap image Weight the computed DEC map by a provided outputmap. If the outputmap has a different grid, the DEC map is first resliced and renormalised. To achieve panchromatic sharpening, provide an image with a higher spatial resolution than the input FOD image; e.g., a T1 anatomical volume. Only the DEC is subject to the mask, so as to allow for partial colouring of the outputmap. Default when this option is not provided: integral of input FOD, subject to the same mask/threshold as used for DEC computation.
  • -no-weight Do not weight the DEC map (reslicing and renormalising still possible by explicitly providing the outputmap option as a template).
  • -lum Correct for luminance/perception, using default values Cr,Cg,Cb = 0.3,0.5,0.2 and gamma = 2.2 (not correcting is the theoretical equivalent of Cr,Cg,Cb = 1,1,1 and gamma = 2).
  • -lum-coefs values The coefficients Cr,Cg,Cb to correct for luminance/perception. Note: this implicitly switches on luminance/perception correction, using a default gamma = 2.2 unless specified otherwise.
  • -lum-gamma value The gamma value to correct for luminance/perception. Note: this implicitly switches on luminance/perception correction, using a default Cr,Cg,Cb = 0.3,0.5,0.2 unless specified otherwise.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

Dhollander T, Smith RE, Tournier JD, Jeurissen B, Connelly A. Time to move on: an FOD-based DEC map to replace DTI’s trademark DEC FA. Proc Intl Soc Mag Reson Med, 2015, 23, 1027.

Dhollander T, Raffelt D, Smith RE, Connelly A. Panchromatic sharpening of FOD-based DEC maps by structural T1 information. Proc Intl Soc Mag Reson Med, 2015, 23, 566.


Author: Thijs Dhollander (thijs.dhollander@gmail.com)

Copyright: Copyright (C) 2014 The Florey Institute of Neuroscience and Mental Health, Melbourne, Australia. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


fod2fixel

Synopsis

fod2fixel [ options ]  fod
  • fod: the input fod image.

Description

use a fast-marching level-set method to segment fibre orientation distributions, and save parameters of interest as fixel images

Options

  • -mask image only perform computation within the specified binary brain mask image.

Metric values for fixel-based sparse output images

  • -afd image store the total Apparent Fibre Density per fixel (integral of FOD lobe)
  • -peak image store the peak FOD amplitude per fixel
  • -disp image store a measure of dispersion per fixel as the ratio between FOD lobe integral and peak amplitude

FOD FMLS segmenter options

  • -fmls_ratio_integral_to_neg value threshold the ratio between the integral of a positive FOD lobe, and the integral of the largest negative lobe. Any lobe that fails to exceed the integral dictated by this ratio will be discarded. Default: 0.
  • -fmls_ratio_peak_to_mean_neg value threshold the ratio between the peak amplitude of a positive FOD lobe, and the mean peak amplitude of all negative lobes. Any lobe that fails to exceed the peak amplitude dictated by this ratio will be discarded. Default: 1.
  • -fmls_peak_value value threshold the raw peak amplitude of positive FOD lobes. Any lobe for which the peak amplitude is smaller than this threshold will be discarded. Default: 0.1.
  • -fmls_no_thresholds disable all FOD lobe thresholding; every lobe with a positive FOD amplitude will be retained.
  • -fmls_peak_ratio_to_merge value specify the amplitude ratio between a sample and the smallest peak amplitude of the adjoining lobes, above which the lobes will be merged. This is the relative amplitude between the smallest of two adjoining lobes, and the ‘bridge’ between the two lobes. A value of 1.0 will never merge two peaks into a single lobe; a value of 0.0 will always merge lobes unless they are bisected by a zero crossing. Default: 1.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

  • Reference for the FOD segmentation method:Smith, R. E.; Tournier, J.-D.; Calamante, F. & Connelly, A. SIFT: Spherical-deconvolution informed filtering of tractograms. NeuroImage, 2013, 67, 298-312 (Appendix 2)
  • Reference for Apparent Fibre Density:Raffelt, D.; Tournier, J.-D.; Rose, S.; Ridgway, G.R.; Henderson, R.; Crozier, S.; Salvado, O.; Connelly, A. Apparent Fibre Density: a novel measure for the analysis of diffusion-weighted magnetic resonance images.Neuroimage, 2012, 15;59(4), 3976-94.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


label2colour

Synopsis

label2colour [ options ]  nodes_in colour_out
  • nodes_in: the input node parcellation image
  • colour_out: the output colour image

Description

convert a parcellated image (where values are node indices) into a colour image (many software packages handle this colouring internally within their viewer program; this binary explicitly converts a parcellation image into a colour image that should be viewable in any software)

Options

  • -lut file Provide the relevant colour lookup table (if not provided, nodes will be coloured randomly)

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


label2mesh

Synopsis

label2mesh [ options ]  nodes_in mesh_out
  • nodes_in: the input node parcellation image
  • mesh_out: the output mesh file

Description

generate meshes from a label image.

Options

  • -blocky generate ‘blocky’ meshes with precise delineation of voxel edges, rather than the default Marching Cubes approach

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


labelconvert

Synopsis

labelconvert [ options ]  path_in lut_in lut_out image_out
  • path_in: the input image
  • lut_in: the connectome lookup table for the input image
  • lut_out: the target connectome lookup table for the output image
  • image_out: the output image

Description

Convert a connectome node image from one lookup table to another. Typical usage is to convert a parcellation image provided by some other software, based on the lookup table provided by that software, to conform to a new lookup table, particularly one where the node indices increment from 1, in preparation for connectome construction; examples of such target lookup table files are provided in src//connectome//tables//

Options

  • -spine image provide a manually-defined segmentation of the base of the spine where the streamlines terminate, so that this can become a node in the connection matrix.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


maskfilter

Synopsis

maskfilter [ options ]  input filter output
  • input: the input image.
  • filter: the type of filter to be applied (connect, dilate, erode, median)
  • output: the output image.

Description

Perform filtering operations on 3D / 4D mask images.

The available filters are: connect, dilate, erode, median.

Each filter has its own unique set of optional parameters.

Options

Options for connected-component filter

  • -axes axes specify which axes should be included in the connected components. By default only the first 3 axes are included. The axes should be provided as a comma-separated list of values.
  • -largest only retain the largest connected component
  • -connectivity use 26-voxel-neighbourhood connectivity (Default: 6)

Options for dilate / erode filters

  • -npass value the number of times to repeatedly apply the filter

Options for median filter

  • -extent voxels specify the extent (width) of kernel size in voxels. This can be specified either as a single value to be used for all axes, or as a comma-separated list of the extent for each axis. The default is 3x3x3.

Stride options

  • -stride spec specify the strides of the output data in memory, as a comma-separated list. The actual strides produced will depend on whether the output image format can support it.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au), David Raffelt (david.raffelt@florey.edu.au) and J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mesh2pve

Synopsis

mesh2pve [ options ]  source template output
  • source: the mesh file; note vertices must be defined in realspace coordinates
  • template: the template image
  • output: the output image

Description

convert a mesh surface to a partial volume estimation image.

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

Smith, R. E.; Tournier, J.-D.; Calamante, F. & Connelly, A. Anatomically-constrained tractography: Improved diffusion MRI streamlines tractography through effective use of anatomical information. NeuroImage, 2012, 62, 1924-1938


Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


meshconvert

Synopsis

meshconvert [ options ]  input output
  • input: the input mesh file
  • output: the output mesh file

Description

convert meshes between different formats, and apply transformations.

Options

  • -binary write the output file in binary format

Options for applying spatial transformations to vertices

  • -transform_first2real image transform vertices from FSL FIRST’s native corrdinate space to real space
  • -transform_real2first image transform vertices from FSL real space to FIRST’s native corrdinate space
  • -transform_voxel2real image transform vertices from voxel space to real space
  • -transform_real2voxel image transform vertices from real space to voxel space

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


meshfilter

Synopsis

meshfilter [ options ]  input filter output
  • input: the input mesh file
  • filter: the filter to apply.Options are: smooth
  • output: the output mesh file

Description

apply filter operations to meshes.

Options

Options for mesh smoothing filter

  • -smooth_spatial value spatial extent of smoothing (default: 10mm)
  • -smooth_influence value influence factor for smoothing (default: 10)

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mraverageheader

Synopsis

mraverageheader [ options ]  input [ input ... ] output
  • input: the input image(s).
  • output: the output image

Description

This command calculates the average (unbiased) coordinate space of all input images

Options

  • -padding value boundary box padding in voxels. Default: 0
  • -resolution type subsampling of template compared to smallest voxel size in any input image. Valid options are ‘mean’: unbiased but loss of resolution for individual images possible, and ‘max’: smallest voxel size of any input image defines the resolution. Default: mean
  • -fill set the intensity in the first volume of the average space to 1

Data type options

  • -datatype spec specify output image data type. Valid choices are: float32, float32le, float32be, float64, float64le, float64be, int64, uint64, int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le, int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be, cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be, int8, uint8, bit.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Maximilian Pietsch (maximilian.pietsch@kcl.ac.uk)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrcalc

Synopsis

mrcalc [ options ]  operand [ operand ... ]
  • operand: an input image, intensity value, or the special keywords ‘rand’ (random number between 0 and 1) or ‘randn’ (random number from unit std.dev. normal distribution).

Description

apply generic voxel-wise mathematical operations to images.

This command will only compute per-voxel operations. Use ‘mrmath’ to compute summary statistics across images or along image axes.

This command uses a stack-based syntax, with operators (specified using options) operating on the top-most entries (i.e. images or values) in the stack. Operands (values or images) are pushed onto the stack in the order they appear (as arguments) on the command-line, and operands (specified as options) operate on and consume the top-most entries in the stack, and push their output as a new entry on the stack. For example:

$ mrcalc a.mif 2 -mult r.mif

performs the operation r = 2*a for every voxel a,r in images a.mif and r.mif respectively. Similarly:

$ mrcalc a.mif -neg b.mif -div -exp 9.3 -mult r.mif

performs the operation r = 9.3*exp(-a/b), and:

$ mrcalc a.mif b.mif -add c.mif d.mif -mult 4.2 -add -div r.mif

performs r = (a+b)/(c*d+4.2).

As an additional feature, this command will allow images with different dimensions to be processed, provided they satisfy the following conditions: for each axis, the dimensions match if they are the same size, or one of them has size one. In the latter case, the entire image will be replicated along that axis. This allows for example a 4D image of size [ X Y Z N ] to be added to a 3D image of size [ X Y Z ], as if it consisted of N copies of the 3D image along the 4th axis (the missing dimension is assumed to have size 1). Another example would a single-voxel 4D image of size [ 1 1 1 N ], multiplied by a 3D image of size [ X Y Z ], which would allow the creation of a 4D image where each volume consists of the 3D image scaled by the corresponding value for that volume in the single-voxel image.

Options

Unary operators

  • -abs absolute value
  • -neg negative value
  • -sqrt square root
  • -exp exponential function
  • -log natural logarithm
  • -log10 common logarithm
  • -cos cosine
  • -sin sine
  • -tan tangent
  • -cosh hyperbolic cosine
  • -sinh hyperbolic sine
  • -tanh hyperbolic tangent
  • -acos inverse cosine
  • -asin inverse sine
  • -atan inverse tangent
  • -acosh inverse hyperbolic cosine
  • -asinh inverse hyperbolic sine
  • -atanh inverse hyperbolic tangent
  • -round round to nearest integer
  • -ceil round up to nearest integer
  • -floor round down to nearest integer
  • -isnan true (1) is operand is not-a-number (NaN)
  • -isinf true (1) is operand is infinite (Inf)
  • -finite true (1) is operand is finite (i.e. not NaN or Inf)
  • -real real part of complex number
  • -imag imaginary part of complex number
  • -phase phase of complex number
  • -conj complex conjugate

Binary operators

  • -add add values
  • -subtract subtract nth operand from (n-1)th
  • -multiply multiply values
  • -divide divide (n-1)th operand by nth
  • -pow raise (n-1)th operand to nth power
  • -min smallest of last two operands
  • -max greatest of last two operands
  • -lt less-than operator (true=1, false=0)
  • -gt greater-than operator (true=1, false=0)
  • -le less-than-or-equal-to operator (true=1, false=0)
  • -ge greater-than-or-equal-to operator (true=1, false=0)
  • -eq equal-to operator (true=1, false=0)
  • -neq not-equal-to operator (true=1, false=0)
  • -complex create complex number using the last two operands as real,imaginary components

Ternary operators

  • -if if first operand is true (non-zero), return second operand, otherwise return third operand

Data type options

  • -datatype spec specify output image data type. Valid choices are: float32, float32le, float32be, float64, float64le, float64be, int64, uint64, int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le, int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be, cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be, int8, uint8, bit.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrcat

Synopsis

mrcat [ options ]  image1 image2 [ image2 ... ] output
  • image1: the first input image.
  • image2: additional input image(s).
  • output: the output image.

Description

concatenate several images into one

Options

  • -axis axis specify axis along which concatenation should be performed. By default, the program will use the last non-singleton, non-spatial axis of any of the input images - in other words axis 3 or whichever axis (greater than 3) of the input images has size greater than one.

Data type options

  • -datatype spec specify output image data type. Valid choices are: float32, float32le, float32be, float64, float64le, float64be, int64, uint64, int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le, int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be, cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be, int8, uint8, bit.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrcheckerboardmask

Synopsis

mrcheckerboardmask [ options ]  input output
  • input: the input image to be .
  • output: the output binary image mask.

Description

create bitwise checkerboard image

Options

  • -tiles value specify the number of tiles in any direction
  • -invert invert output binary mask.
  • -nan use NaN as the output zero value.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Max Pietsch (maximilian.pietsch@kcl.ac.uk)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrclusterstats

Synopsis

mrclusterstats [ options ]  input design contrast mask output
  • input: a text file containing the file names of the input images, one file per line
  • design: the design matrix, rows should correspond with images in the input image text file
  • contrast: the contrast matrix, only specify one contrast as it will automatically compute the opposite contrast.
  • mask: a mask used to define voxels included in the analysis.
  • output: the filename prefix for all output.

Description

Voxel-based analysis using permutation testing and threshold-free cluster enhancement.

Options

  • -negative automatically test the negative (opposite) contrast. By computing the opposite contrast simultaneously the computation time is reduced.
  • -nperms num the number of permutations (default = 5000).
  • -threshold value the cluster-forming threshold to use for a standard cluster-based analysis. This disables TFCE, which is the default otherwise.
  • -tfce_dh value the height increment used in the TFCE integration (default = 0.1)
  • -tfce_e value TFCE extent parameter (default = 0.5)
  • -tfce_h value TFCE height parameter (default = 2)
  • -connectivity use 26-voxel-neighbourhood connectivity (Default: 6)
  • -nonstationary perform non-stationarity correction (currently only implemented with tfce)
  • -nperms_nonstationary num the number of permutations used when precomputing the empirical statistic image for nonstationary correction (Default: 5000)

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

  • If not using the -threshold command-line option:Smith, S. M. & Nichols, T. E. Threshold-free cluster enhancement: Addressing problems of smoothing, threshold dependence and localisation in cluster inference. NeuroImage, 2009, 44, 83-98
  • If using the -nonstationary option:Salimi-Khorshidi, G. Smith, S.M. Nichols, T.E. Adjusting the effect of nonstationarity in cluster-based and TFCE inference. Neuroimage, 2011, 54(3), 2006-19

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrconvert

Synopsis

mrconvert [ options ]  input output
  • input: the input image.
  • output: the output image.

Description

perform conversion between different file types and optionally extract a subset of the input image.

If used correctly, this program can be a very useful workhorse. In addition to converting images between different formats, it can be used to extract specific studies from a data set, extract a specific region of interest, or flip the images.

Options

  • -coord axis coord extract data from the input image only at the coordinates specified.
  • -vox sizes change the voxel dimensions of the output image. The new sizes should be provided as a comma-separated list of values. Only those values specified will be changed. For example: 1,,3.5 will change the voxel size along the x & z axes, and leave the y-axis voxel size unchanged.
  • -axes axes specify the axes from the input image that will be used to form the output image. This allows the permutation, ommission, or addition of axes into the output image. The axes should be supplied as a comma-separated list of axes. Any ommitted axes must have dimension 1. Axes can be inserted by supplying -1 at the corresponding position in the list.
  • -scaling values specify the data scaling parameters used to rescale the intensity values. These take the form of a comma-separated 2-vector of floating-point values, corresponding to offset & scale, with final intensity values being given by offset + scale * stored_value. By default, the values in the input image header are passed through to the output image header when writing to an integer image, and reset to 0,1 (no scaling) for floating-point and binary images. Note that his option has no effect for floating-point and binary images.

Stride options

  • -stride spec specify the strides of the output data in memory, as a comma-separated list. The actual strides produced will depend on whether the output image format can support it.

Data type options

  • -datatype spec specify output image data type. Valid choices are: float32, float32le, float32be, float64, float64le, float64be, int64, uint64, int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le, int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be, cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be, int8, uint8, bit.

DW gradient table import options

  • -grad encoding specify the diffusion-weighted gradient scheme used in the acquisition. The program will normally attempt to use the encoding stored in the image header. This should be supplied as a 4xN text file with each line is in the format [ X Y Z b ], where [ X Y Z ] describe the direction of the applied gradient, and b gives the b-value in units of s/mm^2.
  • -fslgrad bvecs bvals specify the diffusion-weighted gradient scheme used in the acquisition in FSL bvecs/bvals format.

DW gradient table export options

  • -export_grad_mrtrix path export the diffusion-weighted gradient table to file in MRtrix format
  • -export_grad_fsl bvecs_path bvals_path export the diffusion-weighted gradient table to files in FSL (bvecs / bvals) format

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrcrop

Synopsis

mrcrop [ options ]  image_in image_out
  • image_in: the image to be cropped
  • image_out: the output path for the resulting cropped image

Description

Crop an image series to a reduced field of view, using either manual setting of axis dimensions, or a computed mask image corresponding to the brain.

If using a mask, a gap of 1 voxel will be left at all 6 edges of the image such that trilinear interpolation upon the resulting images is still valid.

This is useful for axially-acquired brain images, where the image size can be reduced by a factor of 2 by removing the empty space on either side of the brain.

Options

  • -mask image crop the input image according to the spatial extent of a mask image
  • -axis index start end crop the input image in the provided axis

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrfilter

Synopsis

mrfilter [ options ]  input filter output
  • input: the input image.
  • filter: the type of filter to be applied
  • output: the output image.

Description

Perform filtering operations on 3D / 4D MR images. For 4D images, each 3D volume is processed independently.

The available filters are: fft, gradient, median, smooth, normalise.

Each filter has its own unique set of optional parameters.

Options

Options for FFT filter

  • -axes list the axes along which to apply the Fourier Transform. By default, the transform is applied along the three spatial axes. Provide as a comma-separate list of axis indices.
  • -inverse apply the inverse FFT
  • -magnitude output a magnitude image rather than a complex-valued image
  • -centre_zero re-arrange the FFT results so that the zero-frequency component appears in the centre of the image, rather than at the edges

Options for gradient filter

  • -stdev sigma the standard deviation of the Gaussian kernel used to smooth the input image (in mm). The image is smoothed to reduced large spurious gradients caused by noise. Use this option to override the default stdev of 1 voxel. This can be specified either as a single value to be used for all 3 axes, or as a comma-separated list of 3 values, one for each axis.
  • -magnitude output the gradient magnitude, rather than the default x,y,z components
  • -scanner define the gradient with respect to the scanner coordinate frame of reference.

Options for median filter

  • -extent size specify extent of median filtering neighbourhood in voxels. This can be specified either as a single value to be used for all 3 axes, or as a comma-separated list of 3 values, one for each axis (default: 3x3x3).

Options for normalisation filter

  • -extent size specify extent of normalisation filtering neighbourhood in voxels. This can be specified either as a single value to be used for all 3 axes, or as a comma-separated list of 3 values, one for each axis (default: 3x3x3).

Options for smooth filter

  • -stdev mm apply Gaussian smoothing with the specified standard deviation. The standard deviation is defined in mm (Default 1 voxel). This can be specified either as a single value to be used for all axes, or as a comma-separated list of the stdev for each axis.
  • -fwhm mm apply Gaussian smoothing with the specified full-width half maximum. The FWHM is defined in mm (Default 1 voxel * 2.3548). This can be specified either as a single value to be used for all axes, or as a comma-separated list of the FWHM for each axis.
  • -extent voxels specify the extent (width) of kernel size in voxels. This can be specified either as a single value to be used for all axes, or as a comma-separated list of the extent for each axis. The default extent is 2 * ceil(2.5 * stdev / voxel_size) - 1.

Stride options

  • -stride spec specify the strides of the output data in memory, as a comma-separated list. The actual strides produced will depend on whether the output image format can support it.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au), David Raffelt (david.raffelt@florey.edu.au) and J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrinfo

Synopsis

mrinfo [ options ]  image [ image ... ]
  • image: the input image(s).

Description

display header information, or extract specific information from the header.

By default, all information contained in each image header will be printed to the console in a reader-friendly format.

Alternatively, command-line options may be used to extract specific details from the header(s); these are printed to the console in a format more appropriate for scripting purposes or piping to file. If multiple options and/or images are provided, the requested header fields will be printed in the order in which they appear in the help page, with all requested details from each input image in sequence printed before the next image is processed.

The command can also write the diffusion gradient table from a single input image to file; either in the MRtrix or FSL format (bvecs/bvals file pair; includes appropriate diffusion gradient vector reorientation)

Options

  • -format image file format
  • -ndim number of image dimensions
  • -size image size along each axis
  • -vox voxel size along each image dimension
  • -datatype data type used for image data storage
  • -stride data strides i.e. order and direction of axes data layout
  • -offset image intensity offset
  • -multiplier image intensity multiplier
  • -transform the image transform
  • -norealign do not realign transform to near-default RAS coordinate system (the default behaviour on image load). This is useful to inspect the transform and strides as they are actually stored in the header, rather than as MRtrix interprets them.
  • -property key any text properties embedded in the image header under the specified key (use ‘all’ to list all keys found)

DW gradient table import options

  • -grad encoding specify the diffusion-weighted gradient scheme used in the acquisition. The program will normally attempt to use the encoding stored in the image header. This should be supplied as a 4xN text file with each line is in the format [ X Y Z b ], where [ X Y Z ] describe the direction of the applied gradient, and b gives the b-value in units of s/mm^2.
  • -fslgrad bvecs bvals specify the diffusion-weighted gradient scheme used in the acquisition in FSL bvecs/bvals format.
  • -bvalue_scaling mode specifies whether the b-values should be scaled by the square of the corresponding DW gradient norm, as often required for multi-shell or DSI DW acquisition schemes. The default action can also be set in the MRtrix config file, under the BValueScaling entry. Valid choices are yes/no, true/false, 0/1 (default: true).
  • -raw_dwgrad do not modify the gradient table from what was found in the image headers. This skips the validation steps normally performed within MRtrix applications (i.e. do not verify that the number of entries in the gradient table matches the number of volumes in the image, do not scale b-values by gradient norms, do not normalise gradient vectors)

DW gradient table export options

  • -export_grad_mrtrix path export the diffusion-weighted gradient table to file in MRtrix format
  • -export_grad_fsl bvecs_path bvals_path export the diffusion-weighted gradient table to files in FSL (bvecs / bvals) format
  • -dwgrad the diffusion-weighting gradient table, as stored in the header (i.e. without any interpretation, scaling of b-values, or normalisation of gradient vectors)
  • -shells list the average b-value of each shell
  • -shellcounts list the number of volumes in each shell

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (d.tournier@brain.org.au) and Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrmath

Synopsis

mrmath [ options ]  input [ input ... ] operation output
  • input: the input image(s).
  • operation: the operation to apply, one of: mean, median, sum, product, rms, var, std, min, max, absmax, magmax.
  • output: the output image.

Description

compute summary statistic on image intensities either across images, or along a specified axis for a single image. Supported operations are:

mean, median, sum, product, rms (root-mean-square value), var (unbiased variance), std (unbiased standard deviation), min, max, absmax (maximum absolute value), magmax (value with maximum absolute value, preserving its sign).

See also ‘mrcalc’ to compute per-voxel operations.

Options

  • -axis index perform operation along a specified axis of a single input image

Data type options

  • -datatype spec specify output image data type. Valid choices are: float32, float32le, float32be, float64, float64le, float64be, int64, uint64, int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le, int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be, cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be, int8, uint8, bit.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrmesh

Synopsis

mrmesh [ options ]  input output
  • input: the input image.
  • output: the output mesh file.

Description

Generate a mesh file from an image.

Options

  • -blocky generate a ‘blocky’ mesh that precisely represents the voxel edges
  • -threshold value manually set the intensity threshold at which the mesh will be generated (if omitted, a threshold will be determined automatically)

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrmetric

Synopsis

mrmetric [ options ]  image1 image2
  • image1: the first input image.
  • image2: the second input image.

Description

computes a dissimilarity metric between two images. Currently only the mean squared difference is implemented

Options

  • -space iteration method voxel (default): per voxel image1: scanner space of image 1 image2: scanner space of image 2 average: scanner space of the average affine transformation of image 1 and 2
  • -interp method set the interpolation method to use when reslicing (choices: nearest, linear, cubic, sinc. Default: linear).
  • -metric method define the dissimilarity metric used to calculate the cost. Choices: diff (squared differences), cc (negative cross correlation). Default: diff). cc is only implemented for -space average and -interp linear.
  • -mask1 image mask for image 1
  • -mask2 image mask for image 2
  • -nonormalisation do not normalise the dissimilarity metric to the number of voxels.
  • -overlap output number of voxels that were used.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au) and Max Pietsch (maximilian.pietsch@kcl.ac.uk)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrpad

Synopsis

mrpad [ options ]  image_in image_out
  • image_in: the image to be padded
  • image_out: the output path for the resulting padded image

Description

Pad an image to increase the FOV

Options

  • -uniform number pad the input image by a uniform number of voxels on all sides (in 3D)
  • -axis index lower upper pad the input image along the provided axis (defined by index). Lower and upper define the number of voxels to add to the lower and upper bounds of the axis

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrregister

Synopsis

mrregister [ options ]  image1 image2
  • image1: input image 1 (‘moving’)
  • image2: input image 2 (‘template’)

Description

Register two images together using a rigid, affine or a non-linear transformation model.

By default this application will perform an affine, followed by non-linear registration.

FOD registration (with apodised point spread reorientation) will be performed by default if the number of volumes in the 4th dimension equals the number of coefficients in an antipodally symmetric spherical harmonic series (e.g. 6, 15, 28 etc). The -no_reorientation option can be used to force reorientation off if required.

Non-linear registration computes warps to map from both image1->image2 and image2->image1. Similar to Avants (2008) Med Image Anal. 12(1): 26–41, registration is performed by matching both the image1 and image2 in a ‘midway space’. Warps can be saved as two deformation fields that map directly between image1->image2 and image2->image1, or if using -nl_warp_full as a single 5D file that stores all 4 warps image1->mid->image2, and image2->mid->image1. The 5D warp format stores x,y,z deformations in the 4th dimension, and uses the 5th dimension to index the 4 warps. The affine transforms estimated (to midway space) are also stored as comments in the image header. The 5D warp file can be used to reinitialise subsequent registrations, in addition to transforming images to midway space (e.g. for intra-subject alignment in a 2-time-point longitudinal analysis).

Options

  • -type choice the registration type. Valid choices are: rigid, affine, nonlinear, rigid_affine, rigid_nonlinear, affine_nonlinear, rigid_affine_nonlinear (Default: affine_nonlinear)
  • -transformed image image1 after registration transformed to the space of image2
  • -transformed_midway image1_transformed image2_transformed image1 and image2 after registration transformed to the midway space
  • -mask1 filename a mask to define the region of image1 to use for optimisation.
  • -mask2 filename a mask to define the region of image2 to use for optimisation.

Rigid registration options

  • -rigid file the output text file containing the rigid transformation as a 4x4 matrix
  • -rigid_1tomidway file the output text file containing the rigid transformation that aligns image1 to image2 in their common midway space as a 4x4 matrix
  • -rigid_2tomidway file the output text file containing the rigid transformation that aligns image2 to image1 in their common midway space as a 4x4 matrix
  • -rigid_init_translation type initialise the translation and centre of rotation Valid choices are: mass (aligns the centers of mass of both images, default), geometric (aligns geometric image centres) and none.
  • -rigid_init_rotation type initialise the rotation Valid choices are: search (search for the best rotation using mean squared residuals), moments (rotation based on directions of intensity variance with respect to centre of mass), none (default).
  • -rigid_init_matrix file initialise either the rigid, affine, or syn registration with the supplied rigid transformation (as a 4x4 matrix in scanner coordinates). Note that this overrides rigid_init_translation and rigid_init_rotation initialisation
  • -rigid_scale factor use a multi-resolution scheme by defining a scale factor for each level using comma separated values (Default: 0.25,0.5,1.0)
  • -rigid_niter num the maximum number of iterations. This can be specified either as a single number for all multi-resolution levels, or a single value for each level. (Default: 1000)
  • -rigid_metric type valid choices are: diff (intensity differences), Default: diff
  • -rigid_metric.diff.estimator type Valid choices are: l1 (least absolute: |x|), l2 (ordinary least squares), lp (least powers: |x|^1.2), Default: l2
  • -rigid_lmax num explicitly set the lmax to be used per scale factor in rigid FOD registration. By default FOD registration will use lmax 0,2,4 with default scale factors 0.25,0.5,1.0 respectively. Note that no reorientation will be performed with lmax = 0.

Affine registration options

  • -affine file the output text file containing the affine transformation as a 4x4 matrix
  • -affine_1tomidway file the output text file containing the affine transformation that aligns image1 to image2 in their common midway space as a 4x4 matrix
  • -affine_2tomidway file the output text file containing the affine transformation that aligns image2 to image1 in their common midway space as a 4x4 matrix
  • -affine_init_translation type initialise the translation and centre of rotation Valid choices are: mass (aligns the centers of mass of both images), geometric (aligns geometric image centres) and none. (Default: mass)
  • -affine_init_rotation type initialise the rotation Valid choices are: search (search for the best rotation using mean squared residuals), moments (rotation based on directions of intensity variance with respect to centre of mass), none (Default: none).
  • -affine_init_matrix file initialise either the affine, or syn registration with the supplied affine transformation (as a 4x4 matrix in scanner coordinates). Note that this overrides affine_init_translation and affine_init_rotation initialisation
  • -affine_scale factor use a multi-resolution scheme by defining a scale factor for each level using comma separated values (Default: 0.25,0.5,1.0)
  • -affine_niter num the maximum number of iterations. This can be specified either as a single number for all multi-resolution levels, or a single value for each level. (Default: 1000)
  • -affine_metric type valid choices are: diff (intensity differences), Default: diff
  • -affine_metric.diff.estimator type Valid choices are: l1 (least absolute: |x|), l2 (ordinary least squares), lp (least powers: |x|^1.2), Default: l2
  • -affine_lmax num explicitly set the lmax to be used per scale factor in affine FOD registration. By default FOD registration will use lmax 0,2,4 with default scale factors 0.25,0.5,1.0 respectively. Note that no reorientation will be performed with lmax = 0.

Advanced linear transformation initialisation options

  • -init_translation.unmasked1 disregard mask1 for the translation initialisation (affects ‘mass’)
  • -init_translation.unmasked2 disregard mask2 for the translation initialisation (affects ‘mass’)
  • -init_rotation.unmasked1 disregard mask1 for the rotation initialisation (affects ‘search’ and ‘moments’)
  • -init_rotation.unmasked2 disregard mask2 for the rotation initialisation (affects ‘search’ and ‘moments’)
  • -init_rotation.search.angles angles rotation angles for the local search in degrees between 0 and 180. (Default: 2,5,10,15,20)
  • -init_rotation.search.scale scale relative size of the images used for the rotation search. (Default: 0.15)
  • -init_rotation.search.directions num number of rotation axis for local search. (Default: 250)
  • -init_rotation.search.run_global perform a global search. (Default: local)
  • -init_rotation.search.global.iterations num number of rotations to investigate (Default: 10000)

Non-linear registration options

  • -nl_warp warp1 warp2 the non-linear warp output defined as two deformation fields, where warp1 can be used to transform image1->image2 and warp2 to transform image2->image1. The deformation fields also encapsulate any linear transformation estimated prior to non-linear registration.
  • -nl_warp_full image output all warps used during registration. This saves four different warps that map each image to a midway space and their inverses in a single 5D image file. The 4th image dimension indexes the x,y,z component of the deformation vector and the 5th dimension indexes the field in this order: image1->midway, midway->image1, image2->midway, midway->image2. Where image1->midway defines the field that maps image1 onto the midway space using the reverse convention When linear registration is performed first, the estimated linear transform will be included in the comments of the image header, and therefore the entire linear and non-linear transform can be applied (in either direction) using this output warp file with mrtransform
  • -nl_init image initialise the non-linear registration with the supplied warp image. The supplied warp must be in the same format as output using the -nl_warp_full option (i.e. have 4 deformation fields with the linear transforms in the image header)
  • -nl_scale factor use a multi-resolution scheme by defining a scale factor for each level using comma separated values (Default: 0.25,0.5,1.0)
  • -nl_niter num the maximum number of iterations. This can be specified either as a single number for all multi-resolution levels, or a single value for each level. (Default: 50)
  • -nl_update_smooth stdev regularise the gradient update field with Gaussian smoothing (standard deviation in voxel units, Default 2.0 x voxel_size)
  • -nl_disp_smooth stdev regularise the displacement field with Gaussian smoothing (standard deviation in voxel units, Default 1.0 x voxel_size)
  • -nl_grad_step num the gradient step size for non-linear registration (Default: 0.5)
  • -nl_lmax num explicitly set the lmax to be used per scale factor in non-linear FOD registration. By default FOD registration will use lmax 0,2,4 with default scale factors 0.25,0.5,1.0 respectively. Note that no reorientation will be performed with lmax = 0.

FOD registration options

  • -directions file the directions used for FOD reorienation using apodised point spread functions (Default: 60 directions)
  • -noreorientation turn off FOD reorientation. Reorientation is on by default if the number of volumes in the 4th dimension corresponds to the number of coefficients in an antipodally symmetric spherical harmonic series (i.e. 6, 15, 28, 45, 66 etc

Data type options

  • -datatype spec specify output image data type. Valid choices are: float32, float32le, float32be, float64, float64le, float64be, int64, uint64, int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le, int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be, cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be, int8, uint8, bit.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

  • If FOD registration is being performed:Raffelt, D.; Tournier, J.-D.; Fripp, J; Crozier, S.; Connelly, A. & Salvado, O. Symmetric diffeomorphic registration of fibre orientation distributions. NeuroImage, 2011, 56(3), 1171-1180

Raffelt, D.; Tournier, J.-D.; Crozier, S.; Connelly, A. & Salvado, O. Reorientation of fiber orientation distributions using apodized point spread functions. Magnetic Resonance in Medicine, 2012, 67, 844-855


Author: David Raffelt (david.raffelt@florey.edu.au) & Max Pietsch (maximilian.pietsch@kcl.ac.uk)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrresize

Synopsis

mrresize [ options ]  input output
  • input: input image to be resized.
  • output: the output image.

Description

Resize an image by defining the new image resolution, voxel size or a scale factor.

Note that if the image is 4D, then only the first 3 dimensions can be resized.

Also note that if the image is down-sampled, the appropriate smoothing is automatically applied using Gaussian smoothing.

Options

  • -size dims define the new image size for the output image. This should be specified as a comma-separated list.
  • -voxel size define the new voxel size for the output image. This can be specified either as a single value to be used for all dimensions, or as a comma-separated list of the size for each voxel dimension.
  • -scale factor scale the image resolution by the supplied factor. This can be specified either as a single value to be used for all dimensions, or as a comma-separated list of scale factors for each dimension.
  • -interp method set the interpolation method to use when resizing (choices: nearest, linear, cubic, sinc. Default: cubic).

Data type options

  • -datatype spec specify output image data type. Valid choices are: float32, float32le, float32be, float64, float64le, float64be, int64, uint64, int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le, int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be, cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be, int8, uint8, bit.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrstats

Synopsis

mrstats [ options ]  image
  • image: the input image from which statistics will be computed.

Description

compute images statistics.

Options

Statistics options

  • -output field output only the field specified. Multiple such options can be supplied if required. Choices are: mean, median, std, min, max, count. Useful for use in scripts.
  • -mask image only perform computation within the specified binary mask image.
  • -histogram file generate histogram of intensities and store in specified text file. Note that the first line of the histogram gives the centre of the bins.
  • -bins num the number of bins to use to generate the histogram (default = 100).
  • -dump file dump the voxel intensities to a text file.
  • -voxel pos only perform computation within the specified voxel, supplied as a comma-separated vector of 3 integer values (multiple voxels can be included).
  • -position file dump the position of the voxels in the mask to a text file.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrthreshold

Synopsis

mrthreshold [ options ]  input output
  • input: the input image to be thresholded.
  • output: the output binary image mask.

Description

create bitwise image by thresholding image intensity. By default, an optimal threshold is determined using a parameter-free method. Alternatively the threshold can be defined manually by the user or using a histogram-based analysis to cut out the background.

Options

  • -abs value specify threshold value as absolute intensity.
  • -histogram define the threshold by a histogram analysis to cut out the background. Note that only the first study is used for thresholding.
  • -percentile value threshold the image at the ith percentile.
  • -top N provide a mask of the N top-valued voxels
  • -bottom N provide a mask of the N bottom-valued voxels
  • -invert invert output binary mask.
  • -toppercent N provide a mask of the N%% top-valued voxels
  • -bottompercent N provide a mask of the N%% bottom-valued voxels
  • -nan use NaN as the output zero value.
  • -ignorezero ignore zero-valued input voxels.
  • -mask image compute the optimal threshold based on voxels within a mask.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

  • If not using the -abs option:Ridgway, G. R.; Omar, R.; Ourselin, S.; Hill, D. L.; Warren, J. D. & Fox, N. C. Issues with threshold masking in voxel-based morphometry of atrophied brains. NeuroImage, 2009, 44, 99-111

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrtransform

Synopsis

mrtransform [ options ]  input output
  • input: input image to be transformed.
  • output: the output image.

Description

apply spatial transformations to an image.

If a linear transform is applied without a template image the command will modify the image header transform matrix

FOD reorientation (with apodised point spread functions) will be performed by default if the number of volumes in the 4th dimension equals the number of coefficients in an antipodally symmetric spherical harmonic series (e.g. 6, 15, 28 etc). The -no_reorientation option can be used to force reorientation off if required.

If a DW scheme is contained in the header (or specified separately), and the number of directions matches the number of volumes in the images, any transformation applied using the -linear option will be also be applied to the directions.

Options

Affine transformation options

  • -linear transform specify a 4x4 linear transform to apply, in the form of a 4x4 ascii file. Note the standard ‘reverse’ convention is used, where the transform maps points in the template image to the moving image. Note that the reverse convention is still assumed even if no -template image is supplied
  • -flip axes flip the specified axes, provided as a comma-separated list of indices (0:x, 1:y, 2:z).
  • -inverse apply the inverse transformation
  • -half apply the matrix square root of the transformation. This can be combined with the inverse option.
  • -replace replace the linear transform of the original image by that specified, rather than applying it to the original image. If no -linear transform is specified then the header transform is replaced with an identity transform.

Regridding options

  • -template image reslice the input image to match the specified template image grid.
  • -midway_space reslice the input image to the midway space. Requires either the -template or -warp option. If used with -template and -linear option the input image will be resliced onto the grid halfway between the input and template. If used with the -warp option the input will be warped to the midway space defined by the grid of the input warp (i.e. half way between image1 and image2)
  • -interp method set the interpolation method to use when reslicing (choices: nearest, linear, cubic, sinc. Default: cubic).

Non-linear transformation options

  • -warp image apply a non-linear 4D deformation field to warp the input image. Each voxel in the deformation field must define the scanner space position that will be used to interpolate the input image during warping (i.e. pull-back/reverse warp convention). If the -template image is also supplied the deformation field will be resliced first to the template image grid. If no -template option is supplied then the output image will have the same image grid as the deformation field. This option can be used in combination with the -affine option, in which case the affine will be applied first)
  • -warp_full image warp the input image using a 5D warp file output from mrregister. Any linear transforms in the warp image header will also be applied. The -warp_full option must be used in combination with either the -template option or the -midway_space option. If a -template image is supplied then the full warp will be used. By default the image1->image2 transform will be applied, however the -from 2 option can be used to apply the image2->image1 transform. Use the -midway_space option to warp the input image to the midway space. The -from option can also be used to define which warp to use when transforming to midway space
  • -from image used to define which space the input image is when using the -warp_mid option. Use -from 1 to warp from image1 or -from 2 to warp from image2

Fibre orientation distribution handling options

  • -modulate modulate FODs during reorientation to preserve the apparent fibre density across fibre bundle widths before and after the transformation
  • -directions file directions defining the number and orientation of the apodised point spread functions used in FOD reorientation (Default: 300 directions)
  • -noreorientation turn off FOD reorientation. Reorientation is on by default if the number of volumes in the 4th dimension corresponds to the number of coefficients in an antipodally symmetric spherical harmonic series (i.e. 6, 15, 28, 45, 66 etc

DW gradient table import options

  • -grad encoding specify the diffusion-weighted gradient scheme used in the acquisition. The program will normally attempt to use the encoding stored in the image header. This should be supplied as a 4xN text file with each line is in the format [ X Y Z b ], where [ X Y Z ] describe the direction of the applied gradient, and b gives the b-value in units of s/mm^2.
  • -fslgrad bvecs bvals specify the diffusion-weighted gradient scheme used in the acquisition in FSL bvecs/bvals format.
  • -bvalue_scaling mode specifies whether the b-values should be scaled by the square of the corresponding DW gradient norm, as often required for multi-shell or DSI DW acquisition schemes. The default action can also be set in the MRtrix config file, under the BValueScaling entry. Valid choices are yes/no, true/false, 0/1 (default: true).

Data type options

  • -datatype spec specify output image data type. Valid choices are: float32, float32le, float32be, float64, float64le, float64be, int64, uint64, int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le, int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be, cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be, int8, uint8, bit.
  • -nan Use NaN as the out of bounds value (Default: 0.0)

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

  • If FOD reorientation is being performed:Raffelt, D.; Tournier, J.-D.; Crozier, S.; Connelly, A. & Salvado, O. Reorientation of fiber orientation distributions using apodized point spread functions. Magnetic Resonance in Medicine, 2012, 67, 844-855
  • If FOD modulation is being performed:Raffelt, D.; Tournier, J.-D.; Rose, S.; Ridgway, G.R.; Henderson, R.; Crozier, S.; Salvado, O.; Connelly, A.; Apparent Fibre Density: a novel measure for the analysis of diffusion-weighted magnetic resonance images. NeuroImage, 2012, 15;59(4), 3976-94.

Author: J-Donald Tournier (jdtournier@gmail.com) and David Raffelt (david.raffelt@florey.edu.au) and Max Pietsch (maximilian.pietsch@kcl.ac.uk)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


mrview

Synopsis

mrview [ options ] [ image ... ]
  • image: an image to be loaded.

Description

the MRtrix image viewer.

Options

View options

  • -mode index Switch to view mode specified by the integer index. as per the view menu.
  • -load image Load image specified and make it current.
  • -reset Reset the view according to current image. This resets the FOV, projection, and focus.
  • -fov value Set the field of view, in mm.
  • -focus x,y,z Set the position of the crosshairs in scanner coordinates, with the new position supplied as a comma-separated list of floating-point values.
  • -voxel x,y,z Set the position of the crosshairs in voxel coordinates, relative the image currently displayed. The new position should be supplied as a comma-separated list of floating-point values.
  • -plane index Set the viewing plane, according to the mappping 0: sagittal; 1: coronal; 2: axial.
  • -lock yesno Set whether view is locked to image axes (0: no, 1: yes).
  • -select_image index Switch to image number specified, with reference to the list of currently loaded images.
  • -autoscale Reset the image scaling to automatically determined range.
  • -interpolation_on Enable the image interpolation.
  • -interpolation_off Disable the image interpolation.
  • -colourmap index Switch the image colourmap to that specified, as per the colourmap menu.
  • -intensity_range min,max Set the image intensity range to that specified

Window management options

  • -size width,height Set the size of the view area, in pixel units.
  • -position x,y Set the position of the main window, in pixel units.
  • -fullscreen Start fullscreen.
  • -nointerpolation Disable interpolation of the image.
  • -exit quit MRView

Debugging options

  • -fps Display frames per second, averaged over the last 10 frames. The maximum over the last 3 seconds is also displayed.

Overlay tool options

  • -overlay.load image Loads the specified image on the overlay tool.
  • -overlay.opacity value Sets the overlay opacity to floating value [0-1].
  • -overlay.interpolation_on Enables overlay image interpolation.
  • -overlay.interpolation_off Disables overlay image interpolation.
  • -overlay.colourmap index Sets the colourmap of the overlay as indexed in the colourmap dropdown menu.

ROI editor tool options

  • -roi.load image Loads the specified image on the ROI editor tool.
  • -roi.opacity value Sets the overlay opacity to floating value [0-1].

Tractography tool options

  • -tractography.load tracks Load the specified tracks file into the tractography tool.

ODF tool options

  • -odf.load_sh image Loads the specified SH-based ODF image on the ODF tool.
  • -odf.load_tensor image Loads the specified tensor image on the ODF tool.
  • -odf.load_dixel image Loads the specified dixel-based image on the ODF tool.

Vector plot tool options

  • -vector.load image Load the specified MRtrix sparse image file (.msf) into the fixel tool.

Connectome tool options

  • -connectome.init image Initialise the connectome tool using a parcellation image.
  • -connectome.load path Load a matrix file into the connectome tool.

Screen Capture tool options

  • -capture.folder path Set the output folder for the screen capture tool.
  • -capture.prefix string Set the output file prefix for the screen capture tool.
  • -capture.grab Start the screen capture process.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

Tournier, J.-D.; Calamante, F. & Connelly, A. MRtrix: Diffusion tractography in crossing fiber regions. Int. J. Imaging Syst. Technol., 2012, 22, 53-66


Author: J-Donald Tournier (d.tournier@brain.org.au), Dave Raffelt (david.raffelt@florey.edu.au) and Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


peaks2amp

Synopsis

peaks2amp [ options ]  directions amplitudes
  • directions: the input directions image. Each volume corresponds to the x, y & z component of each direction vector in turn.
  • amplitudes: the output amplitudes image.

Description

convert peak directions image to amplitudes.

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


sh2amp

Synopsis

sh2amp [ options ]  input directions output
  • input: the input image consisting of spherical harmonic (SH) coefficients.
  • directions: the list of directions along which the SH functions will be sampled, generated using the dirgen command
  • output: the output image consisting of the amplitude of the SH functions along the specified directions.

Description

Evaluate the amplitude of an image of spherical harmonic functions along the specified directions

Options

  • -gradient assume input directions are supplied as a gradient encoding file
  • -nonnegative cap all negative amplitudes to zero

Stride options

  • -stride spec specify the strides of the output data in memory, as a comma-separated list. The actual strides produced will depend on whether the output image format can support it.

Data type options

  • -datatype spec specify output image data type. Valid choices are: float32, float32le, float32be, float64, float64le, float64be, int64, uint64, int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le, int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be, cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be, int8, uint8, bit.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


sh2peaks

Synopsis

sh2peaks [ options ]  SH output
  • SH: the input image of SH coefficients.
  • output: the output image. Each volume corresponds to the x, y & z component of each peak direction vector in turn.

Description

extract the peaks of a spherical harmonic function at each voxel, by commencing a Newton search along a set of specified directions

Options

  • -num peaks the number of peaks to extract (default: 3).
  • -direction phi theta the direction of a peak to estimate. The algorithm will attempt to find the same number of peaks as have been specified using this option.
  • -peaks image the program will try to find the peaks that most closely match those in the image provided.
  • -threshold value only peak amplitudes greater than the threshold will be considered.
  • -seeds file specify a set of directions from which to start the multiple restarts of the optimisation (by default, the built-in 60 direction set is used)
  • -mask image only perform computation within the specified binary brain mask image.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


sh2power

Synopsis

sh2power [ options ]  SH power
  • SH: the input spherical harmonics coefficients image.
  • power: the output power image.

Description

compute the total power of a spherical harmonics image.

This command computes the sum of squared SH coefficients, which equals the mean-squared amplitude of the spherical function it represents.

Options

  • -spectrum output the power spectrum, i.e., the power contained within each harmonic degree (l=0, 2, 4, ...) as a 4-D image.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


sh2response

Synopsis

sh2response [ options ]  SH mask directions response
  • SH: the spherical harmonic decomposition of the diffusion-weighted images
  • mask: the mask containing the voxels from which to estimate the response function
  • directions: a 4D image containing the direction vectors along which to estimate the response function
  • response: the output axially-symmetric spherical harmonic coefficients

Description

generate an appropriate response function from the image data for spherical deconvolution

Options

  • -lmax value specify the maximum harmonic degree of the response function to estimate

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


shbasis

Synopsis

shbasis [ options ]  SH [ SH ... ]
  • SH: the input image(s) of SH coefficients.

Description

examine the values in spherical harmonic images to estimate (and optionally change) the SH basis used.

In previous versions of MRtrix, the convention used for storing spherical harmonic coefficients was a non-orthonormal basis (the m!=0 coefficients were a factor of sqrt(2) too large). This error has been rectified in the new MRtrix (assuming that compilation was performed without the USE_NON_ORTHONORMAL_SH_BASIS symbol defined), but will cause issues if processing SH data that was generated using an older version of MRtrix (or vice-versa).

This command provides a mechanism for testing the basis used in storage of image data representing a spherical harmonic series per voxel, and allows the user to forcibly modify the raw image data to conform to the desired basis.

Options

  • -convert mode convert the image data in-place to the desired basis (if necessary). Options are: old, new, native (whichever basis MRtrix is compiled for; most likely the new orthonormal basis), force_oldtonew, force_newtoold. Note that for the “force_*” choices should ideally only be used in cases where the command is unable to automatically determine the SH basis using the existing image data.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


shconv

Synopsis

shconv [ options ]  SH_in response SH_out
  • SH_in: the input spherical harmonics coefficients image.
  • response: the convolution kernel (response function)
  • SH_out: the output spherical harmonics coefficients image.

Description

perform a spherical convolution

Options

  • -mask image only perform computation within the specified binary brain mask image.

Stride options

  • -stride spec specify the strides of the output data in memory, as a comma-separated list. The actual strides produced will depend on whether the output image format can support it.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


shview

Synopsis

shview [ options ] [ coefs ]
  • coefs: a text file containing the even spherical harmonics coefficients to display.

Description

view spherical harmonics surface plots.

Options

  • -response assume SH coefficients file only contains even, m=0 terms. Used to display the response function as produced by estimate_response

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tck2connectome

Synopsis

tck2connectome [ options ]  tracks_in nodes_in connectome_out
  • tracks_in: the input track file
  • nodes_in: the input node parcellation image
  • connectome_out: the output .csv file containing edge weights

Description

generate a connectome matrix from a streamlines file and a node parcellation image

Options

Structural connectome streamline assignment option

  • -assignment_end_voxels use a simple voxel lookup value at each streamline endpoint
  • -assignment_radial_search radius perform a radial search from each streamline endpoint to locate the nearest node.Argument is the maximum radius in mm; if no node is found within this radius, the streamline endpoint is not assigned to any node. Default search distance is 2mm.
  • -assignment_reverse_search max_dist traverse from each streamline endpoint inwards along the streamline, in search of the last node traversed by the streamline. Argument is the maximum traversal length in mm (set to 0 to allow search to continue to the streamline midpoint).
  • -assignment_forward_search max_dist project the streamline forwards from the endpoint in search of a parcellation node voxel. Argument is the maximum traversal length in mm.
  • -assignment_all_voxels assign the streamline to all nodes it intersects along its length (note that this means a streamline may be assigned to more than two nodes, or indeed none at all)

Structural connectome metric options

  • -scale_length scale each contribution to the connectome edge by the length of the streamline
  • -scale_invlength scale each contribution to the connectome edge by the inverse of the streamline length
  • -scale_invnodevol scale each contribution to the connectome edge by the inverse of the two node volumes
  • -scale_file path scale each contribution to the connectome edge according to the values in a vector file

Other options for tck2connectome

  • -stat_edge statistic statistic for combining the values from all streamlines in an edge into a single scale value for that edge (options are: sum,mean,min,max; default=sum)
  • -tck_weights_in path specify a text scalar file containing the streamline weights
  • -keep_unassigned By default, the program discards the information regarding those streamlines that are not successfully assigned to a node pair. Set this option to keep these values (will be the first row/column in the output matrix)
  • -out_assignments path output the node assignments of each streamline to a file
  • -zero_diagonal set all diagonal entries in the matrix to zero (these represent streamlines that connect to the same node at both ends)
  • -vector output a vector representing connectivities from a given seed point to target nodes, rather than a matrix of node-node connectivities

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tckconvert

Synopsis

tckconvert [ options ]  input output
  • input: the input track file.
  • output: the output track file.

Description

Convert between different track file formats.

The program currently supports MRtrix .tck files (input/output), ascii text files (input/output), and VTK polydata files (output only).

Options

  • -scanner2voxel reference if specified, the properties of this image will be used to convert track point positions from real (scanner) coordinates into voxel coordinates.
  • -scanner2image reference if specified, the properties of this image will be used to convert track point positions from real (scanner) coordinates into image coordinates (in mm).
  • -voxel2scanner reference if specified, the properties of this image will be used to convert track point positions from voxel coordinates into real (scanner) coordinates.
  • -image2scanner reference if specified, the properties of this image will be used to convert track point positions from image coordinates (in mm) into real (scanner) coordinates.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Daan Christiaens (daan.christiaens@gmail.com), J-Donald Tournier (jdtournier@gmail.com), Philip Broser (philip.broser@me.com).

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tckedit

Synopsis

tckedit [ options ]  tracks_in [ tracks_in ... ] tracks_out
  • tracks_in: the input track file(s)
  • tracks_out: the output track file

Description

perform various editing operations on track files.

Options

Region Of Interest processing options

  • -include spec specify an inclusion region of interest, as either a binary mask image, or as a sphere using 4 comma-separared values (x,y,z,radius). Streamlines must traverse ALL inclusion regions to be accepted.
  • -exclude spec specify an exclusion region of interest, as either a binary mask image, or as a sphere using 4 comma-separared values (x,y,z,radius). Streamlines that enter ANY exclude region will be discarded.
  • -mask spec specify a masking region of interest, as either a binary mask image, or as a sphere using 4 comma-separared values (x,y,z,radius). If defined, streamlines exiting the mask will be truncated.

Streamline length threshold options

  • -maxlength value set the maximum length of any streamline in mm
  • -minlength value set the minimum length of any streamline in mm

Streamline count truncation options

  • -number count set the desired number of selected streamlines to be propagated to the output file
  • -skip count omit this number of selected streamlines before commencing writing to the output file

Thresholds pertaining to per-streamline weighting

  • -maxweight value set the maximum weight of any streamline
  • -minweight value set the minimum weight of any streamline

Other options specific to tckedit

  • -inverse output the inverse selection of streamlines based on the criteria provided, i.e. only those streamlines that fail at least one criterion will be written to file.
  • -ends_only only test the ends of each streamline against the provided include/exclude ROIs

Options for handling streamline weights

  • -tck_weights_in path specify a text scalar file containing the streamline weights
  • -tck_weights_out path specify the path for an output text scalar file containing streamline weights

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tckgen

Synopsis

tckgen [ options ]  source tracks
  • source: the image containing the source data. The type of data depends on the algorithm used:- FACT: the directions file (each triplet of volumes is the X,Y,Z direction of a fibre population).- iFOD1/2, Nulldist2 & SD_Stream: the SH image resulting from CSD.- Nulldist1 & SeedTest: any image (will not be used).- Tensor_Det / Tensor_Prob: the DWI image.
  • tracks: the output file containing the tracks generated.

Description

perform streamlines tractography.

Options

  • -algorithm name specify the tractography algorithm to use. Valid choices are: FACT, iFOD1, iFOD2, Nulldist1, Nulldist2, SD_Stream, Seedtest, Tensor_Det, Tensor_Prob (default: iFOD2).

Region Of Interest processing options

  • -include spec specify an inclusion region of interest, as either a binary mask image, or as a sphere using 4 comma-separared values (x,y,z,radius). Streamlines must traverse ALL inclusion regions to be accepted.
  • -exclude spec specify an exclusion region of interest, as either a binary mask image, or as a sphere using 4 comma-separared values (x,y,z,radius). Streamlines that enter ANY exclude region will be discarded.
  • -mask spec specify a masking region of interest, as either a binary mask image, or as a sphere using 4 comma-separared values (x,y,z,radius). If defined, streamlines exiting the mask will be truncated.

Streamlines tractography options

  • -step size set the step size of the algorithm in mm (default is 0.1 x voxelsize; for iFOD2: 0.5 x voxelsize).
  • -angle theta set the maximum angle between successive steps (default is 90deg x stepsize / voxelsize).
  • -number tracks set the desired number of tracks. The program will continue to generate tracks until this number of tracks have been selected and written to the output file; set to 0 to ignore limit.
  • -maxnum tracks set the maximum number of tracks to generate. The program will not generate more tracks than this number, even if the desired number of tracks hasn’t yet been reached (default is 100 x number); set to 0 to ignore limit.
  • -maxlength value set the maximum length of any track in mm (default is 100 x voxelsize).
  • -minlength value set the minimum length of any track in mm (default is 5 x voxelsize without ACT, 2 x voxelsize with ACT).
  • -cutoff value set the FA or FOD amplitude cutoff for terminating tracks (default is 0.1).
  • -initcutoff value set the minimum FA or FOD amplitude for initiating tracks (default is the same as the normal cutoff).
  • -trials number set the maximum number of sampling trials at each point (only used for probabilistic tracking).
  • -unidirectional track from the seed point in one direction only (default is to track in both directions).
  • -initdirection dir specify an initial direction for the tracking (this should be supplied as a vector of 3 comma-separated values.
  • -noprecomputed do NOT pre-compute legendre polynomial values. Warning: this will slow down the algorithm by a factor of approximately 4.
  • -power value raise the FOD to the power specified (default is 1/nsamples).
  • -samples number set the number of FOD samples to take per step for the 2nd order (iFOD2) method (Default: 4).
  • -rk4 use 4th-order Runge-Kutta integration (slower, but eliminates curvature overshoot in 1st-order deterministic methods)
  • -stop stop propagating a streamline once it has traversed all include regions
  • -downsample factor downsample the generated streamlines to reduce output file size (default is (samples-1) for iFOD2, no downsampling for all other algorithms)

Anatomically-Constrained Tractography options

  • -act image use the Anatomically-Constrained Tractography framework during tracking;provided image must be in the 5TT (five-tissue-type) format
  • -backtrack allow tracks to be truncated and re-tracked if a poor structural termination is encountered
  • -crop_at_gmwmi crop streamline endpoints more precisely as they cross the GM-WM interface

Tractography seeding options

  • -seed_sphere spec spherical seed as four comma-separated values (XYZ position and radius)
  • -seed_image image seed streamlines entirely at random within a mask image (this is the same behaviour as the streamline seeding in MRtrix 0.2)
  • -seed_random_per_voxel image num_per_voxel seed a fixed number of streamlines per voxel in a mask image; random placement of seeds in each voxel
  • -seed_grid_per_voxel image grid_size seed a fixed number of streamlines per voxel in a mask image; place seeds on a 3D mesh grid (grid_size argument is per axis; so a grid_size of 3 results in 27 seeds per voxel)
  • -seed_rejection image seed from an image using rejection sampling (higher values = more probable to seed from)
  • -seed_gmwmi seed_image seed from the grey matter - white matter interface (only valid if using ACT framework)
  • -seed_dynamic fod_image determine seed points dynamically using the SIFT model (must not provide any other seeding mechanism). Note that while this seeding mechanism improves the distribution of reconstructed streamlines density, it should NOT be used as a substitute for the SIFT method itself.
  • -max_seed_attempts count set the maximum number of times that the tracking algorithm should attempt to find an appropriate tracking direction from a given seed point
  • -output_seeds path output the seed location of all successful streamlines to a file

DW gradient table import options

  • -grad encoding specify the diffusion-weighted gradient scheme used in the acquisition. The program will normally attempt to use the encoding stored in the image header. This should be supplied as a 4xN text file with each line is in the format [ X Y Z b ], where [ X Y Z ] describe the direction of the applied gradient, and b gives the b-value in units of s/mm^2.
  • -fslgrad bvecs bvals specify the diffusion-weighted gradient scheme used in the acquisition in FSL bvecs/bvals format.
  • -bvalue_scaling mode specifies whether the b-values should be scaled by the square of the corresponding DW gradient norm, as often required for multi-shell or DSI DW acquisition schemes. The default action can also be set in the MRtrix config file, under the BValueScaling entry. Valid choices are yes/no, true/false, 0/1 (default: true).

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

References based on streamlines algorithm used:

  • FACT:Mori, S.; Crain, B. J.; Chacko, V. P. & van Zijl, P. C. M. Three-dimensional tracking of axonal projections in the brain by magnetic resonance imaging. Annals of Neurology, 1999, 45, 265-269
  • iFOD1 or SD_STREAM:Tournier, J.-D.; Calamante, F. & Connelly, A. MRtrix: Diffusion tractography in crossing fiber regions. Int. J. Imaging Syst. Technol., 2012, 22, 53-66
  • iFOD2:Tournier, J.-D.; Calamante, F. & Connelly, A. Improved probabilistic streamlines tractography by 2nd order integration over fibre orientation distributions. Proceedings of the International Society for Magnetic Resonance in Medicine, 2010, 1670
  • Nulldist1 / Nulldist2:Morris, D. M.; Embleton, K. V. & Parker, G. J. Probabilistic fibre tracking: Differentiation of connections from chance events. NeuroImage, 2008, 42, 1329-1339
  • Tensor_Det:Basser, P. J.; Pajevic, S.; Pierpaoli, C.; Duda, J. & Aldroubi, A. In vivo fiber tractography using DT-MRI data. Magnetic Resonance in Medicine, 2000, 44, 625-632
  • Tensor_Prob:Jones, D. Tractography Gone Wild: Probabilistic Fibre Tracking Using the Wild Bootstrap With Diffusion Tensor MRI. IEEE Transactions on Medical Imaging, 2008, 27, 1268-1274

References based on command-line options:

  • -rk4:Basser, P. J.; Pajevic, S.; Pierpaoli, C.; Duda, J. & Aldroubi, A. In vivo fiber tractography using DT-MRI data. Magnetic Resonance in Medicine, 2000, 44, 625-632
  • -act, -backtrack, -seed_gmwmi:Smith, R. E.; Tournier, J.-D.; Calamante, F. & Connelly, A. Anatomically-constrained tractography: Improved diffusion MRI streamlines tractography through effective use of anatomical information. NeuroImage, 2012, 62, 1924-1938
  • -seed_dynamic:Smith, R. E.; Tournier, J.-D.; Calamante, F. & Connelly, A. SIFT2: Enabling dense quantitative assessment of brain white matter connectivity using streamlines tractography. NeuroImage, 2015, 119, 338-351

Author: J-Donald Tournier (jdtournier@gmail.com) and Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tckglobal

Synopsis

tckglobal [ options ]  source response tracks
  • source: the image containing the raw DWI data.
  • response: the response of a track segment on the DWI signal.
  • tracks: the output file containing the tracks generated.

Description

Multi-Shell Multi-Tissue Global Tractography.

This command will reconstruct the global white matter fibre tractogram that best explains the input DWI data, using a multi-tissue spherical convolution model.

Example use:

$ tckglobal dwi.mif wmr.txt -riso csfr.txt -riso gmr.txt -mask mask.mif -niter 1e8 -fod fod.mif -fiso fiso.mif tracks.tck

in which dwi.mif is the input image, wmr.txt is an anisotropic, multi-shell response function for WM, and csfr.txt and gmr.txt are isotropic response functions for CSF and GM. The output tractogram is saved to tracks.tck; ancillary output images fod.mif and fiso.mif contain the WM fODF and isotropic tissue fractions of CSF and GM respectively.

Options

Input options

  • -grad scheme specify the diffusion encoding scheme (required if not supplied in the header).
  • -mask image only reconstruct the tractogram within the specified brain mask image.
  • -riso response set one or more isotropic response functions. (multiple allowed)

Parameters

  • -lmax order set the maximum harmonic order for the output series. (default = 8)
  • -length size set the length of the particles (fibre segments). (default = 1mm)
  • -weight w set the weight by which particles contribute to the model. (default = 0.1)
  • -ppot u set the particle potential, i.e., the cost of adding one segment, relative to the particle weight. (default = 0.05)
  • -cpot v set the connection potential, i.e., the energy term that drives two segments together. (default = 0.5)
  • -t0 start set the initial temperature of the metropolis hastings optimizer. (default = 0.1)
  • -t1 end set the final temperature of the metropolis hastings optimizer. (default = 0.001)
  • -niter n set the number of iterations of the metropolis hastings optimizer. (default = 10M)

Output options

  • -fod odf filename of the resulting fODF image.
  • -noapo disable spherical convolution of fODF with apodized PSF.
  • -fiso iso filename of the resulting isotropic fractions image.
  • -eext eext filename of the resulting image of the residual external energy.
  • -etrend stats internal and external energy trend and cooling statistics.

Advanced parameters, if you really know what you’re doing

  • -balance b balance internal and external energy. (default = 0Negative values give more weight to the internal energy, positive to the external energy.
  • -density lambda set the desired density of the free Poisson process. (default = 1)
  • -prob prob set the probabilities of generating birth, death, randshift, optshift and connect probabilities respectively. (default = 0.25,0.05,0.25,0.1,0.35)
  • -beta b set the width of the Hanning interpolation window. (in [0, 1], default = 0)If used, a mask is required, and this mask must keep at least one voxel distance to the image bounding box.
  • -lambda lam set the weight of the internal energy directly. (default = 1)If provided, any value of -balance will be ignored.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

Christiaens, D.; Reisert, M.; Dhollander, T.; Sunaert, S.; Suetens, P. & Maes, F. Global tractography of multi-shell diffusion-weighted imaging data using a multi-tissue model. NeuroImage, 2015, 123, 89-101


Author: Daan Christiaens (daan.christiaens@kuleuven.be)

Copyright: Copyright (C) 2015 KU Leuven, Dept. Electrical Engineering, ESAT/PSI, Herestraat 49 box 7003, 3000 Leuven, Belgium

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


tckinfo

Synopsis

tckinfo [ options ]  tracks [ tracks ... ]
  • tracks: the input track file.

Description

print out information about track file

Options

  • -count count number of tracks in file explicitly, ignoring the header

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tckmap

Synopsis

tckmap [ options ]  tracks output
  • tracks: the input track file.
  • output: the output track-weighted image

Description

Use track data as a form of contrast for producing a high-resolution image.

Note: if you run into limitations with RAM usage, make sure you output the results to a .mif file or .mih / .dat file pair - this will avoid the allocation of an additional buffer to store the output for write-out.

Options

Options for the header of the output image

  • -template image an image file to be used as a template for the output (the output image will have the same transform and field of view).
  • -vox size provide either an isotropic voxel size (in mm), or comma-separated list of 3 voxel dimensions.
  • -datatype spec specify output image data type.

Options for the dimensionality of the output image

  • -dec perform track mapping in directionally-encoded colour (DEC) space
  • -dixel path map streamlines to dixels within each voxel; requires either a number of dixels (references an internal direction set), or a path to a text file containing a set of directions stored as azimuth/elevation pairs
  • -tod lmax generate a Track Orientation Distribution (TOD) in each voxel; need to specify the maximum spherical harmonic degree lmax to use when generating Apodised Point Spread Functions

Options for the TWI image contrast properties

  • -contrast type define the desired form of contrast for the output imageOptions are: tdi, length, invlength, scalar_map, scalar_map_count, fod_amp, curvature, vector_file (default: tdi)
  • -image image provide the scalar image map for generating images with ‘scalar_map’ / ‘scalar_map_count’ contrast, or the spherical harmonics image for ‘fod_amp’ contrast
  • -vector_file path provide the vector data file for generating images with ‘vector_file’ contrast
  • -stat_vox type define the statistic for choosing the final voxel intensities for a given contrast type given the individual values from the tracks passing through each voxel. Options are: sum, min, mean, max (default: sum)
  • -stat_tck type define the statistic for choosing the contribution to be made by each streamline as a function of the samples taken along their lengths. Only has an effect for ‘scalar_map’, ‘fod_amp’ and ‘curvature’ contrast types. Options are: sum, min, mean, max, median, mean_nonzero, gaussian, ends_min, ends_mean, ends_max, ends_prod (default: mean)
  • -fwhm_tck value when using gaussian-smoothed per-track statistic, specify the desired full-width half-maximum of the Gaussian smoothing kernel (in mm)
  • -map_zero if a streamline has zero contribution based on the contrast & statistic, typically it is not mapped; use this option to still contribute to the map even if this is the case (these non-contributing voxels can then influence the mean value in each voxel of the map)

Options for the streamline-to-voxel mapping mechanism

  • -upsample factor upsample the tracks by some ratio using Hermite interpolation before mappping(If omitted, an appropriate ratio will be determined automatically)
  • -precise use a more precise streamline mapping strategy, that accurately quantifies the length through each voxel (these lengths are then taken into account during TWI calculation)
  • -ends_only only map the streamline endpoints to the image
  • -tck_weights_in path specify a text scalar file containing the streamline weights

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

  • For TDI or DEC TDI:Calamante, F.; Tournier, J.-D.; Jackson, G. D. & Connelly, A. Track-density imaging (TDI): Super-resolution white matter imaging using whole-brain track-density mapping. NeuroImage, 2010, 53, 1233-1243
  • If using -contrast length and -stat_vox mean:Pannek, K.; Mathias, J. L.; Bigler, E. D.; Brown, G.; Taylor, J. D. & Rose, S. E. The average pathlength map: A diffusion MRI tractography-derived index for studying brain pathology. NeuroImage, 2011, 55, 133-141
  • If using -dixel option with TDI contrast only:Smith, R.E., Tournier, J-D., Calamante, F., Connelly, A. A novel paradigm for automated segmentation of very large whole-brain probabilistic tractography data sets. In proc. ISMRM, 2011, 19, 673
  • If using -dixel option with any other contrast:Pannek, K., Raffelt, D., Salvado, O., Rose, S. Incorporating directional information in diffusion tractography derived maps: angular track imaging (ATI). In Proc. ISMRM, 2012, 20, 1912
  • If using -tod option:Dhollander, T., Emsell, L., Van Hecke, W., Maes, F., Sunaert, S., Suetens, P. Track Orientation Density Imaging (TODI) and Track Orientation Distribution (TOD) based tractography. NeuroImage, 2014, 94, 312-336
  • If using other contrasts / statistics:Calamante, F.; Tournier, J.-D.; Smith, R. E. & Connelly, A. A generalised framework for super-resolution track-weighted imaging. NeuroImage, 2012, 59, 2494-2503
  • If using -precise mapping option:Smith, R. E.; Tournier, J.-D.; Calamante, F. & Connelly, A. SIFT: Spherical-deconvolution informed filtering of tractograms. NeuroImage, 2013, 67, 298-312 (Appendix 3)

Author: Robert E. Smith (robert.smith@florey.edu.au) and J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tcknormalise

Synopsis

tcknormalise [ options ]  tracks transform output
  • tracks: the input track file.
  • transform: the image containing the transform.
  • output: the output track file

Description

apply a normalisation map to a tracks file.

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tckresample

Synopsis

tckresample [ options ]  in_tracks out_tracks
  • in_tracks: the input track file
  • out_tracks: the output resampled tracks

Description

Resample each streamline to a new set of vertices.

This may be either increasing or decreasing the number of samples along each streamline, or changing the positions of the samples according to some specified trajectory.

Options

Streamline resampling options

  • -upsample ratio increase the density of points along the length of each streamline by some factor (may improve mapping streamlines to ROIs, and/or visualisation)
  • -downsample ratio increase the density of points along the length of each streamline by some factor (decreases required storage space)
  • -step_size value re-sample the streamlines to a desired step size (in mm)
  • -num_points count re-sample each streamline to a fixed number of points
  • -endpoints only output the two endpoints of each streamline
  • -line num start end resample tracks at ‘num’ equidistant locations along a line between ‘start’ and ‘end’ (specified as comma-separated 3-vectors in scanner coordinates)
  • -arc num start mid end resample tracks at ‘num’ equidistant locations along a circular arc specified by points ‘start’, ‘mid’ and ‘end’ (specified as comma-separated 3-vectors in scanner coordinates)

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au) and J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tcksample

Synopsis

tcksample [ options ]  tracks image values
  • tracks: the input track file
  • image: the image to be sampled
  • values: the output sampled values

Description

sample values of an associated image along tracks

By default, the value of the underlying image at each point along the track is written to either an ASCII file (with all values for each track on the same line), or a track scalar file (.tsf). Alternatively, some statistic can be taken from the values along each streamline and written to a vector file.

Options

  • -stat_tck statistic compute some statistic from the values along each streamline (options are: mean,median,min,max)
  • -precise use the precise mechanism for mapping streamlines to voxels (obviates the need for trilinear interpolation) (only applicable if some per-streamline statistic is requested)
  • -use_tdi_fraction each streamline is assigned a fraction of the image intensity in each voxel based on the fraction of the track density contributed by that streamline (this is only appropriate for processing a whole-brain tractogram, and images for which the quantiative parameter is additive)

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tcksift

Synopsis

tcksift [ options ]  in_tracks in_fod out_tracks
  • in_tracks: the input track file
  • in_fod: input image containing the spherical harmonics of the fibre orientation distributions
  • out_tracks: the output filtered tracks file

Description

filter a whole-brain fibre-tracking data set such that the streamline densities match the FOD lobe integrals.

Options

  • -nofilter do NOT perform track filtering - just construct the model in order to provide output debugging images
  • -output_at_counts counts output filtered track files (and optionally debugging images if -output_debug is specified) at specific numbers of remaining streamlines; provide as comma-separated list of integers

Options for setting the processing mask for the SIFT fixel-streamlines comparison model

  • -proc_mask image provide an image containing the processing mask weights for the model; image spatial dimensions must match the fixel image
  • -act image use an ACT five-tissue-type segmented anatomical image to derive the processing mask

Options affecting the SIFT model

  • -fd_scale_gm provide this option (in conjunction with -act) to heuristically downsize the fibre density estimates based on the presence of GM in the voxel. This can assist in reducing tissue interface effects when using a single-tissue deconvolution algorithm
  • -no_dilate_lut do NOT dilate FOD lobe lookup tables; only map streamlines to FOD lobes if the precise tangent lies within the angular spread of that lobe
  • -make_null_lobes add an additional FOD lobe to each voxel, with zero integral, that covers all directions with zero / negative FOD amplitudes
  • -remove_untracked remove FOD lobes that do not have any streamline density attributed to them; this improves filtering slightly, at the expense of longer computation time (and you can no longer do quantitative comparisons between reconstructions if this is enabled)
  • -fd_thresh value fibre density threshold; exclude an FOD lobe from filtering processing if its integral is less than this amount (streamlines will still be mapped to it, but it will not contribute to the cost function or the filtering)

Options to make SIFT provide additional output files

  • -csv file output statistics of execution per iteration to a .csv file
  • -output_debug provide various output images for assessing & debugging performace etc.
  • -out_selection path output a text file containing the binary selection of streamlines

Options to control when SIFT terminates filtering

  • -term_number value number of streamlines - continue filtering until this number of streamlines remain
  • -term_ratio value termination ratio - defined as the ratio between reduction in cost function, and reduction in density of streamlines.Smaller values result in more streamlines being filtered out.
  • -term_mu value terminate filtering once the SIFT proportionality coefficient reaches a given value

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

Smith, R. E.; Tournier, J.-D.; Calamante, F. & Connelly, A. SIFT: Spherical-deconvolution informed filtering of tractograms. NeuroImage, 2013, 67, 298-312


Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tcksift2

Synopsis

tcksift2 [ options ]  in_tracks in_fod out_weights
  • in_tracks: the input track file
  • in_fod: input image containing the spherical harmonics of the fibre orientation distributions
  • out_weights: output text file containing the weighting factor for each streamline

Description

successor to the SIFT method; instead of removing streamlines, use an EM framework to find an appropriate cross-section multiplier for each streamline

Options

Options for setting the processing mask for the SIFT fixel-streamlines comparison model

  • -proc_mask image provide an image containing the processing mask weights for the model; image spatial dimensions must match the fixel image
  • -act image use an ACT five-tissue-type segmented anatomical image to derive the processing mask

Options affecting the SIFT model

  • -fd_scale_gm provide this option (in conjunction with -act) to heuristically downsize the fibre density estimates based on the presence of GM in the voxel. This can assist in reducing tissue interface effects when using a single-tissue deconvolution algorithm
  • -no_dilate_lut do NOT dilate FOD lobe lookup tables; only map streamlines to FOD lobes if the precise tangent lies within the angular spread of that lobe
  • -make_null_lobes add an additional FOD lobe to each voxel, with zero integral, that covers all directions with zero / negative FOD amplitudes
  • -remove_untracked remove FOD lobes that do not have any streamline density attributed to them; this improves filtering slightly, at the expense of longer computation time (and you can no longer do quantitative comparisons between reconstructions if this is enabled)
  • -fd_thresh value fibre density threshold; exclude an FOD lobe from filtering processing if its integral is less than this amount (streamlines will still be mapped to it, but it will not contribute to the cost function or the filtering)

Options to make SIFT provide additional output files

  • -csv file output statistics of execution per iteration to a .csv file
  • -output_debug provide various output images for assessing & debugging performace etc.
  • -out_coeffs path output text file containing the weighting coefficient for each streamline

Regularisation options for SIFT2

  • -reg_tikhonov value provide coefficient for regularising streamline weighting coefficients (Tikhonov regularisation) (default: 0)
  • -reg_tv value provide coefficient for regularising variance of streamline weighting coefficient to fixels along its length (Total Variation regularisation) (default: 0.1)

Options for controlling the SIFT2 optimisation algorithm

  • -min_td_frac fraction minimum fraction of the FOD integral reconstructed by streamlines; if the reconstructed streamline density is below this fraction, the fixel is excluded from optimisation (default: 0.1)
  • -min_iters count minimum number of iterations to run before testing for convergence; this can prevent premature termination at early iterations if the cost function increases slightly (default: 10)
  • -max_iters count maximum number of iterations to run before terminating program
  • -min_factor factor minimum weighting factor for an individual streamline; if the factor falls below this number the streamline will be rejected entirely (factor set to zero) (default: 0)
  • -min_coeff coeff minimum weighting coefficient for an individual streamline; similar to the ‘-min_factor’ option, but using the exponential coefficient basis of the SIFT2 model; these parameters are related as: factor = e^(coeff). Note that the -min_factor and -min_coeff options are mutually exclusive - you can only provide one. (default: -inf)
  • -max_factor factor maximum weighting factor that can be assigned to any one streamline (default: inf)
  • -max_coeff coeff maximum weighting coefficient for an individual streamline; similar to the ‘-max_factor’ option, but using the exponential coefficient basis of the SIFT2 model; these parameters are related as: factor = e^(coeff). Note that the -max_factor and -max_coeff options are mutually exclusive - you can only provide one. (default: inf)
  • -max_coeff_step step maximum change to a streamline’s weighting coefficient in a single iteration (default: 1)
  • -min_cf_decrease frac minimum decrease in the cost function (as a fraction of the initial value) that must occur each iteration for the algorithm to continue (default: 2.5e-05)

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

Smith, R. E.; Tournier, J.-D.; Calamante, F. & Connelly, A. SIFT2: Enabling dense quantitative assessment of brain white matter connectivity using streamlines tractography. NeuroImage, 2015, 119, 338-351


Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tckstats

Synopsis

tckstats [ options ]  tracks_in
  • tracks_in: the input track file

Description

calculate statistics on streamlines length.

Options

  • -histogram path output a histogram of streamline lengths
  • -dump path dump the streamlines lengths to a text file
  • -tck_weights_in path specify a text scalar file containing the streamline weights

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tensor2metric

Synopsis

tensor2metric [ options ]  tensor
  • tensor: the input tensor image.

Description

Generate maps of tensor-derived parameters.

Options

  • -adc image compute the mean apparent diffusion coefficient (ADC) of the diffusion tensor. (sometimes also referred to as the mean diffusivity (MD))
  • -fa image compute the fractional anisotropy (FA) of the diffusion tensor.
  • -ad image compute the axial diffusivity (AD) of the diffusion tensor. (equivalent to the principal eigenvalue)
  • -rd image compute the radial diffusivity (RD) of the diffusion tensor. (equivalent to the mean of the two non-principal eigenvalues)
  • -cl image compute the linearity metric of the diffusion tensor. (one of the three Westin shape metrics)
  • -cp image compute the planarity metric of the diffusion tensor. (one of the three Westin shape metrics)
  • -cs image compute the sphericity metric of the diffusion tensor. (one of the three Westin shape metrics)
  • -value image compute the selected eigenvalue(s) of the diffusion tensor.
  • -vector image compute the selected eigenvector(s) of the diffusion tensor.
  • -num sequence specify the desired eigenvalue/eigenvector(s). Note that several eigenvalues can be specified as a number sequence. For example, ‘1,3’ specifies the principal (1) and minor (3) eigenvalues/eigenvectors (default = 1).
  • -modulate choice specify how to modulate the magnitude of the eigenvectors. Valid choices are: none, FA, eigval (default = FA).
  • -mask image only perform computation within the specified binary brain mask image.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

References

Basser, P. J.; Mattiello, J. & Lebihan, D. MR diffusion tensor spectroscopy and imaging. Biophysical Journal, 1994, 66, 259-267

Westin, C. F.; Peled, S.; Gudbjartsson, H.; Kikinis, R. & Jolesz, F. A. Geometrical diffusion measures for MRI from tensor basis analysis. Proc Intl Soc Mag Reson Med, 1997, 5, 1742


Author: Thijs Dhollander (thijs.dhollander@gmail.com) & Ben Jeurissen (ben.jeurissen@uantwerpen.be) & J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


transformcalc

Synopsis

transformcalc [ options ]  input [ input ... ] operation output
  • input: the input for the specified operation
  • operation: the operation to perform, one of: invert, half, rigid, header, average, interpolate.invert: invert the input transformation:matrix_in invert outputhalf: calculate the matrix square root of the input transformation:matrix_in half outputrigid: calculate the rigid transformation of the affine input transformation:matrix_in rigid outputheader: calculate the transformation matrix from an original image and an image with modified header:mov mapmovhdr header outputaverage: calculate the average affine matrix of all input matrices:input ... average outputinterpolate: create interpolated transformation matrix between input (t=0) and input2 (t=1). Based on matrix decomposition with linear interpolation of translation, rotation and stretch described in Shoemake, K., Hill, M., & Duff, T. (1992). Matrix Animation and Polar Decomposition. Matrix, 92, 258-264. doi:10.1.1.56.1336input input2 interpolate output
  • output: the output transformation matrix.

Description

This command’s function is to process linear transformation matrices.

It allows to perform affine matrix operations or to convert the transformation matrix provided by FSL’s flirt command to a format usable in MRtrix

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Max Pietsch (maximilian.pietsch@kcl.ac.uk)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


transformconvert

Synopsis

transformconvert [ options ]  input [ input ... ] operation output
  • input: the input for the specified operation
  • operation: the operation to perform, one of:flirt_import, itk_import.flirt_import: Convert a transformation matrix produced by FSL’s flirt command into a format usable by MRtrix. You’ll need to provide as additional arguments the NIfTI images that were passed to flirt with the -in and -ref options:matrix_in in ref flirt_import outputitk_import: Convert a plain text transformation matrix file produced by ITK’s (ANTS, Slicer) affine registration into a format usable by MRtrix.
  • output: the output transformation matrix.

Description

This command’s function is to convert linear transformation matrices.

It allows to convert the transformation matrix provided by FSL’s flirt command

and ITK’s linear transformation format to a format usable in MRtrix.

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: Max Pietsch (maximilian.pietsch@kcl.ac.uk)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tsfdivide

Synopsis

tsfdivide [ options ]  input input output
  • input: the input track scalar file.
  • input: the input track scalar file.
  • output: the output track scalar file

Description

an application to divide corresponding values in track scalar files

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tsfinfo

Synopsis

tsfinfo [ options ]  tracks [ tracks ... ]
  • tracks: the input track scalar file.

Description

print out information about track scalar file

Options

  • -count count number of tracks in file explicitly, ignoring the header
  • -ascii prefix save values of each track scalar file in individual ascii files, with the specified prefix.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tsfmult

Synopsis

tsfmult [ options ]  input input output
  • input: the input track scalar file.
  • input: the input track scalar file.
  • output: the output track scalar file

Description

an application to multiply corresponding values in track scalar files

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tsfsmooth

Synopsis

tsfsmooth [ options ]  input output
  • input: the input track scalar file.
  • output: the output track scalar file

Description

Gaussian filter a track scalar file

Options

  • -stdev sigma apply Gaussian smoothing with the specified standard deviation. The standard deviation is defined in units of track points (default: 4)

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


tsfthreshold

Synopsis

tsfthreshold [ options ]  input N output
  • input: the input track scalar file.
  • N: the desired threshold
  • output: the binary output track scalar file

Description

an application to threshold and invert track scalar files

Options

  • -invert invert the output mask

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


voxel2fixel

Synopsis

voxel2fixel [ options ]  image_in fixel_in fixel_out
  • image_in: the input image.
  • fixel_in: the input fixel image.
  • fixel_out: the output fixel image.

Description

map the scalar value in each voxel to all fixels within that voxel. This could be used to enable CFE-based statistical analysis to be performed on voxel-wise measures

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


warp2metric

Synopsis

warp2metric [ options ]  in
  • in: the input deformation field

Description

compute fixel or voxel-wise metrics from a 4D deformation field

Options

  • -fc template_input output use an input template fixel image to define fibre orientations and output a fixel image describing the change in fibre cross-section (FC) in the perpendicular plane to the fixel orientation
  • -jmat output output a Jacobian matrix image stored in column-major order along the 4th dimension.Note the output jacobian describes the warp gradient w.r.t the scanner space coordinate system
  • -jdet output output the Jacobian determinant instead of the full matrix

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


warpconvert

Synopsis

warpconvert [ options ]  in out
  • in: the input warp image.
  • out: the output warp image.

Description

convert between different representations of a non-linear warp. A deformation field is defined as an image where each voxel defines the corresponding position in the other image (in scanner space coordinates). A displacement field stores the displacements (in mm) to the other image from the each voxel’s position (in scanner space). The warpfull file is the 5D format output from mrregister -nl_warp_full, which contains linear transforms, warps and their inverses that map each image to a midway space.

Options

  • -type choice the conversion type required. Valid choices are: deformation2displacement, displacement2deformation, warpfull2deformation, warpfull2displacement (Default: deformation2displacement)
  • -template image define a template image when converting a warpfull file (which is defined on a grid in the midway space between image 1 & 2). For example to generate the deformation field that maps image1 to image2, then supply image2 as the template image
  • -midway_space to be used only with warpfull2deformation and warpfull2displacement conversion types. The output will only contain the non-linear warp to map an input image to the midway space (defined by the warpfull grid). If a linear transform exists in the warpfull file header then it will be composed and included in the output.
  • -from image to be used only with warpfull2deformation and warpfull2displacement conversion types. Used to define the direction of the desired output field.Use -from 1 to obtain the image1->image2 field and from 2 for image2->image1. Can be used in combination with the -midway_space option to produce a field that only maps to midway space.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


warpcorrect

Synopsis

warpcorrect [ options ]  in out
  • in: the input warp image.
  • out: the output warp image.

Description

replaces voxels in a deformation field that point to 0,0,0 with nan,nan,nan. This can be used in conjunction with the warpinit command to compute a MRtrix compatible deformation field from non-linear transformations generated by any other registration package.

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: David Raffelt (david.raffelt@florey.edu.au)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org


warpinit

Synopsis

warpinit [ options ]  template warp
  • template: the input template image.
  • warp: the output warp image.

Description

create an initial warp image, representing an identity transformation. This is useful to obtain the warp fields from other normalisation applications, by applying the transformation of interest to the warp field generated by this program.

The image generated is a 4D image with the same spatial characteristics as the input template image. It contains 3 volumes, with each voxel containing its own x,y,z coordinates.

Note that this command can be used to create 3 separate X,Y,Z images directly (which may be useful to create images suitable for use in the registration program) using the following syntax:

$ warpinit template.mif warp-[].nii

Options

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status.
  • -debug display debugging messages.
  • -force force overwrite of output files. Caution: Using the same file as input and output might cause unexpected behaviour.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading)
  • -failonwarn terminate program if a warning is produced
  • -help display this information page and exit.
  • -version display version information and exit.

Author: J-Donald Tournier (jdtournier@gmail.com)

Copyright: Copyright (c) 2008-2016 the MRtrix3 contributors

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

MRtrix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details, see www.mrtrix.org