dwi2mask

Synopsis

Generate a binary mask from DWI data

Usage

dwi2mask algorithm [ options ] ...
  • algorithm: Select the algorithm to be used to complete the script operation; additional details and options become available once an algorithm is nominated. Options are: 3dautomask, ants, b02template, consensus, fslbet, hdbet, legacy, mean, mtnorm, synthstrip, trace

Description

This script serves as an interface for many different algorithms that generate a binary mask from DWI data in different ways. Each algorithm available has its own help page, including necessary references; e.g. to see the help page of the ‘fslbet’ algorithm, type ‘dwi2mask fslbet’.

More information on mask derivation from DWI data can be found at the following link: https://mrtrix.readthedocs.io/en/3.0.4/dwi_preprocessing/masking.html

Options

Options for importing the diffusion gradient table

  • -grad Provide the diffusion gradient table in MRtrix format
  • -fslgrad bvecs bvals Provide the diffusion gradient table in FSL bvecs/bvals format

Additional standard options for Python scripts

  • -nocleanup do not delete intermediate files during script execution, and do not delete scratch directory at script completion.
  • -scratch /path/to/scratch/ manually specify the path in which to generate the scratch directory.
  • -continue <ScratchDir> <LastFile> continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status. Alternatively, this can be achieved by setting the MRTRIX_QUIET environment variable to a non-empty string.
  • -debug display debugging messages.
  • -force force overwrite of output files.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading).
  • -config key value (multiple uses permitted) temporarily set the value of an MRtrix config file entry.
  • -help display this information page and exit.
  • -version display version information and exit.

References

Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch, M.; Christiaens, D.; Jeurissen, B.; Yeh, C.-H. & Connelly, A. MRtrix3: A fast, flexible and open software framework for medical image processing and visualisation. NeuroImage, 2019, 202, 116137


Author: Robert E. Smith (robert.smith@florey.edu.au) and Warda Syeda (wtsyeda@unimelb.edu.au)

Copyright: Copyright (c) 2008-2023 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/.

Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. See the Mozilla Public License v. 2.0 for more details.

For more details, see http://www.mrtrix.org/.

dwi2mask 3dautomask

Synopsis

Use AFNI 3dAutomask to derive a brain mask from the DWI mean b=0 image

Usage

dwi2mask 3dautomask input output [ options ]
  • input: The input DWI series
  • output: The output mask image

Options

Options specific to the ‘afni_3dautomask’ algorithm

  • -clfrac Set the ‘clip level fraction’, must be a number between 0.1 and 0.9. A small value means to make the initial threshold for clipping smaller, which will tend to make the mask larger.
  • -nograd The program uses a ‘gradual’ clip level by default. Add this option to use a fixed clip level.
  • -peels Peel (erode) the mask n times, then unpeel (dilate).
  • -nbhrs Define the number of neighbors needed for a voxel NOT to be eroded. It should be between 6 and 26.
  • -eclip After creating the mask, remove exterior voxels below the clip threshold.
  • -SI After creating the mask, find the most superior voxel, then zero out everything more than SI millimeters inferior to that. 130 seems to be decent (i.e., for Homo Sapiens brains).
  • -dilate Dilate the mask outwards n times
  • -erode Erode the mask outwards n times
  • -NN1 Erode and dilate based on mask faces
  • -NN2 Erode and dilate based on mask edges
  • -NN3 Erode and dilate based on mask corners

Options for importing the diffusion gradient table

  • -grad Provide the diffusion gradient table in MRtrix format
  • -fslgrad bvecs bvals Provide the diffusion gradient table in FSL bvecs/bvals format

Additional standard options for Python scripts

  • -nocleanup do not delete intermediate files during script execution, and do not delete scratch directory at script completion.
  • -scratch /path/to/scratch/ manually specify the path in which to generate the scratch directory.
  • -continue <ScratchDir> <LastFile> continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status. Alternatively, this can be achieved by setting the MRTRIX_QUIET environment variable to a non-empty string.
  • -debug display debugging messages.
  • -force force overwrite of output files.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading).
  • -config key value (multiple uses permitted) temporarily set the value of an MRtrix config file entry.
  • -help display this information page and exit.
  • -version display version information and exit.

References

  • RW Cox. AFNI: Software for analysis and visualization of functional magnetic resonance neuroimages. Computers and Biomedical Research, 29:162-173, 1996.

Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch, M.; Christiaens, D.; Jeurissen, B.; Yeh, C.-H. & Connelly, A. MRtrix3: A fast, flexible and open software framework for medical image processing and visualisation. NeuroImage, 2019, 202, 116137


Author: Ricardo Rios (ricardo.rios@cimat.mx)

Copyright: Copyright (c) 2008-2023 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/.

Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. See the Mozilla Public License v. 2.0 for more details.

For more details, see http://www.mrtrix.org/.

dwi2mask ants

Synopsis

Use ANTs Brain Extraction to derive a DWI brain mask

Usage

dwi2mask ants input output [ options ]
  • input: The input DWI series
  • output: The output mask image

Options

Options specific to the “ants” algorithm

  • -template TemplateImage MaskImage Provide the template image and corresponding mask for antsBrainExtraction.sh to use; the template image should be T2-weighted.

Options for importing the diffusion gradient table

  • -grad Provide the diffusion gradient table in MRtrix format
  • -fslgrad bvecs bvals Provide the diffusion gradient table in FSL bvecs/bvals format

Additional standard options for Python scripts

  • -nocleanup do not delete intermediate files during script execution, and do not delete scratch directory at script completion.
  • -scratch /path/to/scratch/ manually specify the path in which to generate the scratch directory.
  • -continue <ScratchDir> <LastFile> continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status. Alternatively, this can be achieved by setting the MRTRIX_QUIET environment variable to a non-empty string.
  • -debug display debugging messages.
  • -force force overwrite of output files.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading).
  • -config key value (multiple uses permitted) temporarily set the value of an MRtrix config file entry.
  • -help display this information page and exit.
  • -version display version information and exit.

References

    1. Avants, N.J. Tustison, G. Song, P.A. Cook, A. Klein, J.C. Jee. A reproducible evaluation of ANTs similarity metric performance in brain image registration. NeuroImage, 2011, 54, 2033-2044

Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch, M.; Christiaens, D.; Jeurissen, B.; Yeh, C.-H. & Connelly, A. MRtrix3: A fast, flexible and open software framework for medical image processing and visualisation. NeuroImage, 2019, 202, 116137


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

Copyright: Copyright (c) 2008-2023 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/.

Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. See the Mozilla Public License v. 2.0 for more details.

For more details, see http://www.mrtrix.org/.

dwi2mask b02template

Synopsis

Register the mean b=0 image to a T2-weighted template to back-propagate a brain mask

Usage

dwi2mask b02template input output [ options ]
  • input: The input DWI series
  • output: The output mask image

Description

This script currently assumes that the template image provided via the -template option is T2-weighted, and can therefore be trivially registered to a mean b=0 image.

Command-line option -ants_options can be used with either the “antsquick” or “antsfull” software options. In both cases, image dimensionality is assumed to be 3, and so this should be omitted from the user-specified options.The input can be either a string (encased in double-quotes if more than one option is specified), or a path to a text file containing the requested options. In the case of the “antsfull” software option, one will require the names of the fixed and moving images that are provided to the antsRegistration command: these are “template_image.nii” and “bzero.nii” respectively.

Options

Options applicable when using the FSL software for registration

  • -flirt_options ” FlirtOptions” Command-line options to pass to the FSL flirt command (provide a string within quotation marks that contains at least one space, even if only passing a single command-line option to flirt)
  • -fnirt_config FILE Specify a FNIRT configuration file for registration

Options applicable when using the ANTs software for registration

  • -ants_options Provide options to be passed to the ANTs registration command (see Description)

Options specific to the “template” algorithm

  • -software The software to use for template registration; options are: antsfull,antsquick,fsl; default is antsquick
  • -template TemplateImage MaskImage Provide the template image to which the input data will be registered, and the mask to be projected to the input image. The template image should be T2-weighted.

Options for importing the diffusion gradient table

  • -grad Provide the diffusion gradient table in MRtrix format
  • -fslgrad bvecs bvals Provide the diffusion gradient table in FSL bvecs/bvals format

Additional standard options for Python scripts

  • -nocleanup do not delete intermediate files during script execution, and do not delete scratch directory at script completion.
  • -scratch /path/to/scratch/ manually specify the path in which to generate the scratch directory.
  • -continue <ScratchDir> <LastFile> continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status. Alternatively, this can be achieved by setting the MRTRIX_QUIET environment variable to a non-empty string.
  • -debug display debugging messages.
  • -force force overwrite of output files.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading).
  • -config key value (multiple uses permitted) temporarily set the value of an MRtrix config file entry.
  • -help display this information page and exit.
  • -version display version information and exit.

References

  • If FSL software is used for registration: M. Jenkinson, C.F. Beckmann, T.E. Behrens, M.W. Woolrich, S.M. Smith. FSL. NeuroImage, 62:782-90, 2012
  • If ANTs software is used for registration: B. Avants, N.J. Tustison, G. Song, P.A. Cook, A. Klein, J.C. Jee. A reproducible evaluation of ANTs similarity metric performance in brain image registration. NeuroImage, 2011, 54, 2033-2044

Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch, M.; Christiaens, D.; Jeurissen, B.; Yeh, C.-H. & Connelly, A. MRtrix3: A fast, flexible and open software framework for medical image processing and visualisation. NeuroImage, 2019, 202, 116137


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

Copyright: Copyright (c) 2008-2023 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/.

Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. See the Mozilla Public License v. 2.0 for more details.

For more details, see http://www.mrtrix.org/.

dwi2mask consensus

Synopsis

Generate a brain mask based on the consensus of all dwi2mask algorithms

Usage

dwi2mask consensus input output [ options ]
  • input: The input DWI series
  • output: The output mask image

Options

Options specific to the “consensus” algorithm

  • -algorithms Provide a list of dwi2mask algorithms that are to be utilised
  • -masks Export a 4D image containing the individual algorithm masks
  • -template TemplateImage MaskImage Provide a template image and corresponding mask for those algorithms requiring such
  • -threshold The fraction of algorithms that must include a voxel for that voxel to be present in the final mask (default: 0.501)

Options for importing the diffusion gradient table

  • -grad Provide the diffusion gradient table in MRtrix format
  • -fslgrad bvecs bvals Provide the diffusion gradient table in FSL bvecs/bvals format

Additional standard options for Python scripts

  • -nocleanup do not delete intermediate files during script execution, and do not delete scratch directory at script completion.
  • -scratch /path/to/scratch/ manually specify the path in which to generate the scratch directory.
  • -continue <ScratchDir> <LastFile> continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status. Alternatively, this can be achieved by setting the MRTRIX_QUIET environment variable to a non-empty string.
  • -debug display debugging messages.
  • -force force overwrite of output files.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading).
  • -config key value (multiple uses permitted) temporarily set the value of an MRtrix config file entry.
  • -help display this information page and exit.
  • -version display version information and exit.

References

Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch, M.; Christiaens, D.; Jeurissen, B.; Yeh, C.-H. & Connelly, A. MRtrix3: A fast, flexible and open software framework for medical image processing and visualisation. NeuroImage, 2019, 202, 116137


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

Copyright: Copyright (c) 2008-2023 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/.

Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. See the Mozilla Public License v. 2.0 for more details.

For more details, see http://www.mrtrix.org/.

dwi2mask fslbet

Synopsis

Use the FSL Brain Extraction Tool (bet) to generate a brain mask

Usage

dwi2mask fslbet input output [ options ]
  • input: The input DWI series
  • output: The output mask image

Options

Options specific to the ‘fslbet’ algorithm

  • -bet_f Fractional intensity threshold (0->1); smaller values give larger brain outline estimates
  • -bet_g Vertical gradient in fractional intensity threshold (-1->1); positive values give larger brain outline at bottom, smaller at top
  • -bet_c <x y z> Centre-of-gravity (voxels not mm) of initial mesh surface
  • -bet_r Head radius (mm not voxels); initial surface sphere is set to half of this
  • -rescale Rescale voxel size provided to BET to 1mm isotropic; can improve results for rodent data

Options for importing the diffusion gradient table

  • -grad Provide the diffusion gradient table in MRtrix format
  • -fslgrad bvecs bvals Provide the diffusion gradient table in FSL bvecs/bvals format

Additional standard options for Python scripts

  • -nocleanup do not delete intermediate files during script execution, and do not delete scratch directory at script completion.
  • -scratch /path/to/scratch/ manually specify the path in which to generate the scratch directory.
  • -continue <ScratchDir> <LastFile> continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status. Alternatively, this can be achieved by setting the MRTRIX_QUIET environment variable to a non-empty string.
  • -debug display debugging messages.
  • -force force overwrite of output files.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading).
  • -config key value (multiple uses permitted) temporarily set the value of an MRtrix config file entry.
  • -help display this information page and exit.
  • -version display version information and exit.

References

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

Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch, M.; Christiaens, D.; Jeurissen, B.; Yeh, C.-H. & Connelly, A. MRtrix3: A fast, flexible and open software framework for medical image processing and visualisation. NeuroImage, 2019, 202, 116137


Author: Warda Syeda (wtsyeda@unimelb.edu.au) and Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2023 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/.

Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. See the Mozilla Public License v. 2.0 for more details.

For more details, see http://www.mrtrix.org/.

dwi2mask hdbet

Synopsis

Use HD-BET to derive a brain mask from the DWI mean b=0 image

Usage

dwi2mask hdbet input output [ options ]
  • input: The input DWI series
  • output: The output mask image

Options

Options specific to the ‘hdbet’ algorithm

  • -nogpu Do not attempt to run on the GPU

Options for importing the diffusion gradient table

  • -grad Provide the diffusion gradient table in MRtrix format
  • -fslgrad bvecs bvals Provide the diffusion gradient table in FSL bvecs/bvals format

Additional standard options for Python scripts

  • -nocleanup do not delete intermediate files during script execution, and do not delete scratch directory at script completion.
  • -scratch /path/to/scratch/ manually specify the path in which to generate the scratch directory.
  • -continue <ScratchDir> <LastFile> continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status. Alternatively, this can be achieved by setting the MRTRIX_QUIET environment variable to a non-empty string.
  • -debug display debugging messages.
  • -force force overwrite of output files.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading).
  • -config key value (multiple uses permitted) temporarily set the value of an MRtrix config file entry.
  • -help display this information page and exit.
  • -version display version information and exit.

References

  • Isensee F, Schell M, Tursunova I, Brugnara G, Bonekamp D, Neuberger U, Wick A, Schlemmer HP, Heiland S, Wick W, Bendszus M, Maier-Hein KH, Kickingereder P. Automated brain extraction of multi-sequence MRI using artificial neural networks. Hum Brain Mapp. 2019; 1-13. https://doi.org/10.1002/hbm.24750

Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch, M.; Christiaens, D.; Jeurissen, B.; Yeh, C.-H. & Connelly, A. MRtrix3: A fast, flexible and open software framework for medical image processing and visualisation. NeuroImage, 2019, 202, 116137


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

Copyright: Copyright (c) 2008-2023 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/.

Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. See the Mozilla Public License v. 2.0 for more details.

For more details, see http://www.mrtrix.org/.

dwi2mask legacy

Synopsis

Use the legacy MRtrix3 dwi2mask heuristic (based on thresholded trace images)

Usage

dwi2mask legacy input output [ options ]
  • input: The input DWI series
  • output: The output mask image

Options

  • -clean_scale the maximum scale used to cut bridges. A certain maximum scale cuts bridges up to a width (in voxels) of 2x the provided scale. Setting this to 0 disables the mask cleaning step. (Default: 2)

Options for importing the diffusion gradient table

  • -grad Provide the diffusion gradient table in MRtrix format
  • -fslgrad bvecs bvals Provide the diffusion gradient table in FSL bvecs/bvals format

Additional standard options for Python scripts

  • -nocleanup do not delete intermediate files during script execution, and do not delete scratch directory at script completion.
  • -scratch /path/to/scratch/ manually specify the path in which to generate the scratch directory.
  • -continue <ScratchDir> <LastFile> continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status. Alternatively, this can be achieved by setting the MRTRIX_QUIET environment variable to a non-empty string.
  • -debug display debugging messages.
  • -force force overwrite of output files.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading).
  • -config key value (multiple uses permitted) temporarily set the value of an MRtrix config file entry.
  • -help display this information page and exit.
  • -version display version information and exit.

References

Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch, M.; Christiaens, D.; Jeurissen, B.; Yeh, C.-H. & Connelly, A. MRtrix3: A fast, flexible and open software framework for medical image processing and visualisation. NeuroImage, 2019, 202, 116137


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

Copyright: Copyright (c) 2008-2023 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/.

Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. See the Mozilla Public License v. 2.0 for more details.

For more details, see http://www.mrtrix.org/.

dwi2mask mean

Synopsis

Generate a mask based on simply averaging all volumes in the DWI series

Usage

dwi2mask mean input output [ options ]
  • input: The input DWI series
  • output: The output mask image

Options

Options specific to the ‘mean’ algorithm

  • -shells Comma separated list of shells to be included in the volume averaging
  • -clean_scale the maximum scale used to cut bridges. A certain maximum scale cuts bridges up to a width (in voxels) of 2x the provided scale. Setting this to 0 disables the mask cleaning step. (Default: 2)

Options for importing the diffusion gradient table

  • -grad Provide the diffusion gradient table in MRtrix format
  • -fslgrad bvecs bvals Provide the diffusion gradient table in FSL bvecs/bvals format

Additional standard options for Python scripts

  • -nocleanup do not delete intermediate files during script execution, and do not delete scratch directory at script completion.
  • -scratch /path/to/scratch/ manually specify the path in which to generate the scratch directory.
  • -continue <ScratchDir> <LastFile> continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status. Alternatively, this can be achieved by setting the MRTRIX_QUIET environment variable to a non-empty string.
  • -debug display debugging messages.
  • -force force overwrite of output files.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading).
  • -config key value (multiple uses permitted) temporarily set the value of an MRtrix config file entry.
  • -help display this information page and exit.
  • -version display version information and exit.

References

Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch, M.; Christiaens, D.; Jeurissen, B.; Yeh, C.-H. & Connelly, A. MRtrix3: A fast, flexible and open software framework for medical image processing and visualisation. NeuroImage, 2019, 202, 116137


Author: Warda Syeda (wtsyeda@unimelb.edu.au)

Copyright: Copyright (c) 2008-2023 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/.

Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. See the Mozilla Public License v. 2.0 for more details.

For more details, see http://www.mrtrix.org/.

dwi2mask mtnorm

Synopsis

Derives a DWI brain mask by calculating and then thresholding a sum-of-tissue-densities image

Usage

dwi2mask mtnorm input output [ options ]
  • input: The input DWI series
  • output: The output mask image

Description

This script attempts to identify brain voxels based on the total density of macroscopic tissues as estimated through multi-tissue deconvolution. Following response function estimation and multi-tissue deconvolution, the sum of tissue densities is thresholded at a fixed value (default is 0.5), and subsequent mask image cleaning operations are performed.

The operation of this script is a subset of that performed by the script “dwibiasnormmask”. Many users may find that comprehensive solution preferable; this dwi2mask algorithm is nevertheless provided to demonstrate specifically the mask estimation portion of that command.

The ODFs estimated within this optimisation procedure are by default of lower maximal spherical harmonic degree than what would be advised for analysis. This is done for computational efficiency. This behaviour can be modified through the -lmax command-line option.

Options

Options specific to the “mtnorm” algorithm

  • -init_mask image Provide an initial brain mask, which will constrain the response function estimation (if omitted, the default dwi2mask algorithm will be used)
  • -lmax values The maximum spherical harmonic degree for the estimated FODs (see Description); defaults are “4,0,0” for multi-shell and “4,0” for single-shell data)
  • -threshold value the threshold on the total tissue density sum image used to derive the brain mask; default is 0.5
  • -tissuesum image Export the tissue sum image that was used to generate the mask

Options for importing the diffusion gradient table

  • -grad Provide the diffusion gradient table in MRtrix format
  • -fslgrad bvecs bvals Provide the diffusion gradient table in FSL bvecs/bvals format

Additional standard options for Python scripts

  • -nocleanup do not delete intermediate files during script execution, and do not delete scratch directory at script completion.
  • -scratch /path/to/scratch/ manually specify the path in which to generate the scratch directory.
  • -continue <ScratchDir> <LastFile> continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status. Alternatively, this can be achieved by setting the MRTRIX_QUIET environment variable to a non-empty string.
  • -debug display debugging messages.
  • -force force overwrite of output files.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading).
  • -config key value (multiple uses permitted) temporarily set the value of an MRtrix config file entry.
  • -help display this information page and exit.
  • -version display version information and exit.

References

  • 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
  • Dhollander, T.; Raffelt, D. & Connelly, A. Unsupervised 3-tissue response function estimation from single-shell or multi-shell diffusion MR data without a co-registered T1 image. ISMRM Workshop on Breaking the Barriers of Diffusion MRI, 2016, 5

Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch, M.; Christiaens, D.; Jeurissen, B.; Yeh, C.-H. & Connelly, A. MRtrix3: A fast, flexible and open software framework for medical image processing and visualisation. NeuroImage, 2019, 202, 116137


Author: Robert E. Smith (robert.smith@florey.edu.au) and Arshiya Sangchooli (asangchooli@student.unimelb.edu.au)

Copyright: Copyright (c) 2008-2023 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/.

Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. See the Mozilla Public License v. 2.0 for more details.

For more details, see http://www.mrtrix.org/.

dwi2mask synthstrip

Synopsis

Use the FreeSurfer Synthstrip method on the mean b=0 image

Usage

dwi2mask synthstrip input output [ options ]
  • input: The input DWI series
  • output: The output mask image

Description

This algorithm requires that the SynthStrip method be installed and available via PATH; this could be via Freesufer 7.3.0 or later, or the dedicated Singularity container.

Options

Options specific to the ‘Synthstrip’ algorithm

  • -stripped The output stripped image
  • -gpu Use the GPU
  • -model file Alternative model weights
  • -nocsf Compute the immediate boundary of brain matter excluding surrounding CSF
  • -border Control the boundary distance from the brain

Options for importing the diffusion gradient table

  • -grad Provide the diffusion gradient table in MRtrix format
  • -fslgrad bvecs bvals Provide the diffusion gradient table in FSL bvecs/bvals format

Additional standard options for Python scripts

  • -nocleanup do not delete intermediate files during script execution, and do not delete scratch directory at script completion.
  • -scratch /path/to/scratch/ manually specify the path in which to generate the scratch directory.
  • -continue <ScratchDir> <LastFile> continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status. Alternatively, this can be achieved by setting the MRTRIX_QUIET environment variable to a non-empty string.
  • -debug display debugging messages.
  • -force force overwrite of output files.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading).
  • -config key value (multiple uses permitted) temporarily set the value of an MRtrix config file entry.
  • -help display this information page and exit.
  • -version display version information and exit.

References

    1. Hoopes, J. S. Mora, A. V. Dalca, B. Fischl, M. Hoffmann. SynthStrip: Skull-Stripping for Any Brain Image. NeuroImage, 2022, 260, 119474

Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch, M.; Christiaens, D.; Jeurissen, B.; Yeh, C.-H. & Connelly, A. MRtrix3: A fast, flexible and open software framework for medical image processing and visualisation. NeuroImage, 2019, 202, 116137


Author: Ruobing Chen (chrc@student.unimelb.edu.au)

Copyright: Copyright (c) 2008-2023 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/.

Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. See the Mozilla Public License v. 2.0 for more details.

For more details, see http://www.mrtrix.org/.

dwi2mask trace

Synopsis

A method to generate a brain mask from trace images of b-value shells

Usage

dwi2mask trace input output [ options ]
  • input: The input DWI series
  • output: The output mask image

Options

Options for turning ‘dwi2mask trace’ into an iterative algorithm

  • -iterative (EXPERIMENTAL) Iteratively refine the weights for combination of per-shell trace-weighted images prior to thresholding
  • -max_iters Set the maximum number of iterations for the algorithm (default: 10)

Options specific to the ‘trace’ algorithm

  • -shells Comma separated list of shells used to generate trace-weighted images for masking
  • -clean_scale the maximum scale used to cut bridges. A certain maximum scale cuts bridges up to a width (in voxels) of 2x the provided scale. Setting this to 0 disables the mask cleaning step. (Default: 2)

Options for importing the diffusion gradient table

  • -grad Provide the diffusion gradient table in MRtrix format
  • -fslgrad bvecs bvals Provide the diffusion gradient table in FSL bvecs/bvals format

Additional standard options for Python scripts

  • -nocleanup do not delete intermediate files during script execution, and do not delete scratch directory at script completion.
  • -scratch /path/to/scratch/ manually specify the path in which to generate the scratch directory.
  • -continue <ScratchDir> <LastFile> continue the script from a previous execution; must provide the scratch directory path, and the name of the last successfully-generated file.

Standard options

  • -info display information messages.
  • -quiet do not display information messages or progress status. Alternatively, this can be achieved by setting the MRTRIX_QUIET environment variable to a non-empty string.
  • -debug display debugging messages.
  • -force force overwrite of output files.
  • -nthreads number use this number of threads in multi-threaded applications (set to 0 to disable multi-threading).
  • -config key value (multiple uses permitted) temporarily set the value of an MRtrix config file entry.
  • -help display this information page and exit.
  • -version display version information and exit.

References

Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch, M.; Christiaens, D.; Jeurissen, B.; Yeh, C.-H. & Connelly, A. MRtrix3: A fast, flexible and open software framework for medical image processing and visualisation. NeuroImage, 2019, 202, 116137


Author: Warda Syeda (wtsyeda@unimelb.edu.au) and Robert E. Smith (robert.smith@florey.edu.au)

Copyright: Copyright (c) 2008-2023 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/.

Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. See the Mozilla Public License v. 2.0 for more details.

For more details, see http://www.mrtrix.org/.