Python scripts provided with MRtrix3

5ttgen

Synopsis

5ttgen [ options ]

Description

Generate a 5TT image suitable for ACT

Standard options

  • -continue <TempDir> <LastFile> Continue the script from a previous execution; must provide the temporary directory path, and the name of the last successfully-generated file
  • -force Force overwrite of output files if pre-existing
  • -help Display help information for the script
  • -nocleanup Do not delete temporary directory at script completion
  • -nthreads number Use this number of threads in MRtrix multi-threaded applications (0 disables multi-threading)
  • -tempdir /path/to/tmp/ Manually specify the path in which to generate the temporary directory
  • -quiet Suppress all console output during script execution
  • -verbose Display additional information for every command invoked

References

ACT: 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

bet: Smith, S. M. Fast robust automated brain extraction. Human Brain Mapping, 2002, 17, 143-155

fast: Zhang, Y.; Brady, M. & Smith, S. Segmentation of brain MR images through a hidden Markov random field model and the expectation-maximization algorithm. IEEE Transactions on Medical Imaging, 2001, 20, 45-57

first: Patenaude, B.; Smith, S. M.; Kennedy, D. N. & Jenkinson, M. A Bayesian model of shape and appearance for subcortical brain segmentation. NeuroImage, 2011, 56, 907-922

FSL: Smith, S. M.; Jenkinson, M.; Woolrich, M. W.; Beckmann, C. F.; Behrens, T. E.; Johansen-Berg, H.; Bannister, P. R.; De Luca, M.; Drobnjak, I.; Flitney, D. E.; Niazy, R. K.; Saunders, J.; Vickers, J.; Zhang, Y.; De Stefano, N.; Brady, J. M. & Matthews, P. M. Advances in functional and structural MR image analysis and implementation as FSL. NeuroImage, 2004, 23, S208-S219

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


dwi2response

Synopsis

dwi2response [ options ]

Description

Estimate response function(s) for spherical deconvolution

Standard options

  • -continue <TempDir> <LastFile> Continue the script from a previous execution; must provide the temporary directory path, and the name of the last successfully-generated file
  • -force Force overwrite of output files if pre-existing
  • -help Display help information for the script
  • -nocleanup Do not delete temporary directory at script completion
  • -nthreads number Use this number of threads in MRtrix multi-threaded applications (0 disables multi-threading)
  • -tempdir /path/to/tmp/ Manually specify the path in which to generate the temporary directory
  • -quiet Suppress all console output during script execution
  • -verbose Display additional information for every command invoked

References

MSMT_CSD: 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

SD: 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

Tax2014: Tax, C. M.; Jeurissen, B.; Vos, S. B.; Viergever, M. A. & Leemans, A. Recursive calibration of the fiber response function for spherical deconvolution of diffusion MRI data. NeuroImage, 2014, 86, 67-80

Tournier2013: Tournier, J.-D.; Calamante, F. & Connelly, A. Determination of the appropriate b value and number of gradient directions for high-angular-resolution diffusion-weighted imaging. NMR Biomedicine, 2013, 26, 1775-1786

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


dwibiascorrect

Synopsis

dwibiascorrect [ options ] input output
  • input: The input image series to be corrected
  • output: The output corrected image series

Description

Perform B1 field inhomogeneity correction for a DWI volume series

Options

  • -mask Manually provide a mask image for bias field estimation
  • -bias Output the estimated bias field
  • -ants Use ANTS N4 to estimate the inhomogeneity field
  • -fsl Use FSL FAST to estimate the inhomogeneity field
  • -grad Pass the diffusion gradient table in MRtrix format
  • -fslgrad bvecs bvals Pass the diffusion gradient table in FSL bvecs/bvals format

Standard options

  • -continue <TempDir> <LastFile> Continue the script from a previous execution; must provide the temporary directory path, and the name of the last successfully-generated file
  • -force Force overwrite of output files if pre-existing
  • -help Display help information for the script
  • -nocleanup Do not delete temporary directory at script completion
  • -nthreads number Use this number of threads in MRtrix multi-threaded applications (0 disables multi-threading)
  • -tempdir /path/to/tmp/ Manually specify the path in which to generate the temporary directory
  • -quiet Suppress all console output during script execution
  • -verbose Display additional information for every command invoked

References

fast: Zhang, Y.; Brady, M. & Smith, S. Segmentation of brain MR images through a hidden Markov random field model and the expectation-maximization algorithm. IEEE Transactions on Medical Imaging, 2001, 20, 45-57

FSL: Smith, S. M.; Jenkinson, M.; Woolrich, M. W.; Beckmann, C. F.; Behrens, T. E.; Johansen-Berg, H.; Bannister, P. R.; De Luca, M.; Drobnjak, I.; Flitney, D. E.; Niazy, R. K.; Saunders, J.; Vickers, J.; Zhang, Y.; De Stefano, N.; Brady, J. M. & Matthews, P. M. Advances in functional and structural MR image analysis and implementation as FSL. NeuroImage, 2004, 23, S208-S219

N4: Tustison, N.; Avants, B.; Cook, P.; Zheng, Y.; Egan, A.; Yushkevich, P. & Gee, J. N4ITK: Improved N3 Bias Correction. IEEE Transactions on Medical Imaging, 2010, 29, 1310-1320

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


dwiintensitynorm

Synopsis

dwiintensitynorm [ options ] input_dir mask_dir output_dir fa_template wm_mask
  • input_dir: The input directory containing all DWI images
  • mask_dir: Input directory containing brain masks, corresponding to one per input image (with the same file name prefix)
  • output_dir: The output directory containing all of the intensity normalised DWI images
  • fa_template: The output population specific FA template, which is threshold to estimate a white matter mask
  • wm_mask: The output white matter mask (in template space), used to estimate the median b=0 white matter value for normalisation

Description

Performs a global DWI intensity normalisation on a group of subjects using the median b=0 white matter value as the reference. The white matter mask is estimated from a population average FA template then warped back to each subject to perform the intensity normalisation. Note that bias field correction should be performed prior to this step.

Options

  • -fa_threshold The threshold applied to the Fractional Anisotropy group template used to derive an approximate white matter mask

Standard options

  • -continue <TempDir> <LastFile> Continue the script from a previous execution; must provide the temporary directory path, and the name of the last successfully-generated file
  • -force Force overwrite of output files if pre-existing
  • -help Display help information for the script
  • -nocleanup Do not delete temporary directory at script completion
  • -nthreads number Use this number of threads in MRtrix multi-threaded applications (0 disables multi-threading)
  • -tempdir /path/to/tmp/ Manually specify the path in which to generate the temporary directory
  • -quiet Suppress all console output during script execution
  • -verbose Display additional information for every command invoked

References

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


dwipreproc

Synopsis

dwipreproc [ options ] pe_dir input output
  • pe_dir: The phase encode direction; can be a signed axis number (e.g. -0, 1, +2) or a code (e.g. AP, LR, IS)
  • input: The input DWI series to be corrected
  • output: The output corrected image series

Description

Perform diffusion image pre-processing using FSL’s eddy tool; including inhomogeneity distortion correction using FSL’s topup tool if possible

Options

  • -cuda Use the CUDA version of eddy
  • -rpe_none Specify explicitly that no reversed phase-encoding image data is provided; eddy will perform eddy current and motion correction only
  • -rpe_pair forward reverse Provide a pair of images to use for inhomogeneity field estimation; note that the FIRST of these two images must have the same phase-encode direction as the input DWIs
  • -rpe_all input_revpe Provide a second DWI series identical to the input series, that has the opposite phase encoding; these will be combined in the output image
  • -grad Provide a gradient table in MRtrix format
  • -fslgrad bvecs bvals Provide a gradient table in FSL bvecs/bvals format
  • -export_grad_mrtrix grad Export the final gradient table in MRtrix format
  • -export_grad_fsl bvecs bvals Export the final gradient table in FSL bvecs/bvals format

Standard options

  • -continue <TempDir> <LastFile> Continue the script from a previous execution; must provide the temporary directory path, and the name of the last successfully-generated file
  • -force Force overwrite of output files if pre-existing
  • -help Display help information for the script
  • -nocleanup Do not delete temporary directory at script completion
  • -nthreads number Use this number of threads in MRtrix multi-threaded applications (0 disables multi-threading)
  • -tempdir /path/to/tmp/ Manually specify the path in which to generate the temporary directory
  • -quiet Suppress all console output during script execution
  • -verbose Display additional information for every command invoked

References

eddy: Andersson, J. L. & Sotiropoulos, S. N. An integrated approach to correction for off-resonance effects and subject movement in diffusion MR imaging. NeuroImage, 2015, 125, 1063-1078

FSL: Smith, S. M.; Jenkinson, M.; Woolrich, M. W.; Beckmann, C. F.; Behrens, T. E.; Johansen-Berg, H.; Bannister, P. R.; De Luca, M.; Drobnjak, I.; Flitney, D. E.; Niazy, R. K.; Saunders, J.; Vickers, J.; Zhang, Y.; De Stefano, N.; Brady, J. M. & Matthews, P. M. Advances in functional and structural MR image analysis and implementation as FSL. NeuroImage, 2004, 23, S208-S219

Skare2010: Skare, S. & Bammer, R. Jacobian weighting of distortion corrected EPI data. Proceedings of the International Society for Magnetic Resonance in Medicine, 2010, 5063

topup: Andersson, J. L.; Skare, S. & Ashburner, J. How to correct susceptibility distortions in spin-echo echo-planar images: application to diffusion tensor imaging. NeuroImage, 2003, 20, 870-888

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


labelsgmfix

Synopsis

labelsgmfix [ options ] parc t1 lut output
  • parc: The input FreeSurfer parcellation image
  • t1: The T1 image to be provided to FIRST
  • lut: The lookup table file that the parcellated image is based on
  • output: The output parcellation image

Description

In a FreeSurfer parcellation image, replace the sub-cortical grey matter structure delineations using FSL FIRST

Options

  • -premasked Indicate that brain masking has been applied to the T1 input image
  • -sgm_amyg_hipp Consider the amygdalae and hippocampi as sub-cortical grey matter structures, and also replace their estimates with those from FIRST

Standard options

  • -continue <TempDir> <LastFile> Continue the script from a previous execution; must provide the temporary directory path, and the name of the last successfully-generated file
  • -force Force overwrite of output files if pre-existing
  • -help Display help information for the script
  • -nocleanup Do not delete temporary directory at script completion
  • -nthreads number Use this number of threads in MRtrix multi-threaded applications (0 disables multi-threading)
  • -tempdir /path/to/tmp/ Manually specify the path in which to generate the temporary directory
  • -quiet Suppress all console output during script execution
  • -verbose Display additional information for every command invoked

References

first: Patenaude, B.; Smith, S. M.; Kennedy, D. N. & Jenkinson, M. A Bayesian model of shape and appearance for subcortical brain segmentation. NeuroImage, 2011, 56, 907-922

FSL: Smith, S. M.; Jenkinson, M.; Woolrich, M. W.; Beckmann, C. F.; Behrens, T. E.; Johansen-Berg, H.; Bannister, P. R.; De Luca, M.; Drobnjak, I.; Flitney, D. E.; Niazy, R. K.; Saunders, J.; Vickers, J.; Zhang, Y.; De Stefano, N.; Brady, J. M. & Matthews, P. M. Advances in functional and structural MR image analysis and implementation as FSL. NeuroImage, 2004, 23, S208-S219

SIFT_followup: Smith, R. E.; Tournier, J.-D.; Calamante, F. & Connelly, A. The effects of SIFT on the reproducibility and biological accuracy of the structural connectome. NeuroImage, 2015, 104, 253-265

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


population_template

Synopsis

population_template [ options ] input_dir template
  • input_dir: The input directory containing all images used to build the template
  • template: The output template image

Description

Generates an unbiased group-average template from a series of images. First a template is optimised with linear registration (rigid or affine, affine is default), then non-linear registration is used to optimise the template further.

Options

  • -mask_dir Optionally input a set of masks inside a single directory, one per input image (with the same file name prefix). Using masks will speed up registration significantly
  • -warp_dir Output a directory containing warps from each input to the template. If the folder does not exist it will be created
  • -transformed_dir Output a directory containing the input images transformed to the template. If the folder does not exist it will be created
  • -template_mask Output a template mask. Only works in -mask_dir has been input. The template mask is computed as the intersection of all subject masks in template space.
  • -rigid perform rigid registration instead of affine. This should be used for intra-subject registration in longitudinal analysis
  • -linear_scale Specifiy the multi-resolution pyramid used to build the rigid or affine template, in the form of a list of scale factors (default: 0.3,0.4,0.5,0.6,0.7,1.0,1.0,1.0,1.0,1.0). This implicitly defines the number of template levels
  • -linear_lmax Specifiy the lmax used for rigid or affine registration for each scale factor, in the form of a list of integers (default: 0,0,2,2,2,2,2,2,4,4,4,4,4,4,4,4). The list must be the same length as the affine_scale factor list
  • -nl_scale Specifiy the multi-resolution pyramid used to build the non-linear template, in the form of a list of scale factors (default: 0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0). This implicitly defines the number of template levels
  • -nl_lmax Specifiy the lmax used for non-linear registration for each scale factor, in the form of a list of integers (default: 0,0,2,2,2,2,2,2,2,2,4,4,4,4). The list must be the same length as the nl_scale factor list
  • -nl_niter Specifiy the number of registration iterations used within each level before updating the template, in the form of a list of integers (default:5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5). The list must be the same length as the nl_scale factor list
  • -nl_update_smooth Regularise the gradient update field with Gaussian smoothing (standard deviation in voxel units, Default 2.0 x voxel_size)
  • -nl_disp_smooth Regularise the displacement field with Gaussian smoothing (standard deviation in voxel units, Default 1.0 x voxel_size)
  • -nl_grad_step The gradient step size for non-linear registration (Default: 0.5)
  • -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
  • -initial_alignment Method of alignment to form the initial template. Options are “mass” (default), “geometric” and “none”.

Standard options

  • -continue <TempDir> <LastFile> Continue the script from a previous execution; must provide the temporary directory path, and the name of the last successfully-generated file
  • -force Force overwrite of output files if pre-existing
  • -help Display help information for the script
  • -nocleanup Do not delete temporary directory at script completion
  • -nthreads number Use this number of threads in MRtrix multi-threaded applications (0 disables multi-threading)
  • -tempdir /path/to/tmp/ Manually specify the path in which to generate the temporary directory
  • -quiet Suppress all console output during script execution
  • -verbose Display additional information for every command invoked

References

Author: David Raffelt (david.raffelt@florey.edu.au) & Max Pietsch (maximilian.pietsch@kcl.ac.uk) & Thijs Dhollander thijs.dhollander@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