interfaces.mrtrix3.reconst¶
EstimateFOD¶
Wraps the executable command dwi2fod
.
Estimate fibre orientation distributions from diffusion data using spherical deconvolution
Example¶
>>> import nipype.interfaces.mrtrix3 as mrt
>>> fod = mrt.EstimateFOD()
>>> fod.inputs.algorithm = 'csd'
>>> fod.inputs.in_file = 'dwi.mif'
>>> fod.inputs.wm_txt = 'wm.txt'
>>> fod.inputs.grad_fsl = ('bvecs', 'bvals')
>>> fod.cmdline # doctest: +ELLIPSIS
'dwi2fod -fslgrad bvecs bvals -lmax 8 csd dwi.mif wm.txt wm.mif gm.mif csf.mif'
>>> fod.run() # doctest: +SKIP
Inputs:
[Mandatory]
algorithm: ('csd' or 'msmt_csd')
FOD algorithm
argument: ``%s``, position: -8
in_file: (a pathlike object or string representing an existing file)
input DWI image
argument: ``%s``, position: -7
wm_txt: (a pathlike object or string representing a file)
WM response text file
argument: ``%s``, position: -6
wm_odf: (a pathlike object or string representing a file, nipype
default value: wm.mif)
output WM ODF
argument: ``%s``, position: -5
[Optional]
gm_txt: (a pathlike object or string representing a file)
GM response text file
argument: ``%s``, position: -4
gm_odf: (a pathlike object or string representing a file, nipype
default value: gm.mif)
output GM ODF
argument: ``%s``, position: -3
csf_txt: (a pathlike object or string representing a file)
CSF response text file
argument: ``%s``, position: -2
csf_odf: (a pathlike object or string representing a file, nipype
default value: csf.mif)
output CSF ODF
argument: ``%s``, position: -1
mask_file: (a pathlike object or string representing an existing
file)
mask image
argument: ``-mask %s``
shell: (a list of items which are a float)
specify one or more dw gradient shells
argument: ``-shell %s``
max_sh: (a list of items which are an integer (int or long), nipype
default value: [8])
maximum harmonic degree of response function - single value for
single-shell response, list for multi-shell response
argument: ``-lmax %s``
in_dirs: (a pathlike object or string representing an existing 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 the [ az el ]
pairs for the directions.
argument: ``-directions %s``
nthreads: (an integer (int or long))
number of threads. if zero, the number of available cpus will be
used
argument: ``-nthreads %d``
grad_file: (a pathlike object or string representing an existing
file)
dw gradient scheme (MRTrix format)
argument: ``-grad %s``
mutually_exclusive: grad_fsl
grad_fsl: (a tuple of the form: (a pathlike object or string
representing an existing file, a pathlike object or string
representing an existing file))
(bvecs, bvals) dw gradient scheme (FSL format)
argument: ``-fslgrad %s %s``
mutually_exclusive: grad_file
bval_scale: ('yes' or 'no')
specifies whether the b - values should be scaled by the square of
the corresponding DW gradient norm, as often required for multishell
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).
argument: ``-bvalue_scaling %s``
in_bvec: (a pathlike object or string representing an existing file)
bvecs file in FSL format
argument: ``-fslgrad %s %s``
in_bval: (a pathlike object or string representing an existing file)
bvals file in FSL format
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
environ: (a dictionary with keys which are a bytes or None or a value
of class 'str' and with values which are a bytes or None or a
value of class 'str', nipype default value: {})
Environment variables
Outputs:
wm_odf: (a pathlike object or string representing a file)
output WM ODF
argument: ``%s``
gm_odf: (a pathlike object or string representing a file)
output GM ODF
argument: ``%s``
csf_odf: (a pathlike object or string representing a file)
output CSF ODF
argument: ``%s``
FitTensor¶
Wraps the executable command dwi2tensor
.
Convert diffusion-weighted images to tensor images
Example¶
>>> import nipype.interfaces.mrtrix3 as mrt
>>> tsr = mrt.FitTensor()
>>> tsr.inputs.in_file = 'dwi.mif'
>>> tsr.inputs.in_mask = 'mask.nii.gz'
>>> tsr.inputs.grad_fsl = ('bvecs', 'bvals')
>>> tsr.cmdline # doctest: +ELLIPSIS
'dwi2tensor -fslgrad bvecs bvals -mask mask.nii.gz dwi.mif dti.mif'
>>> tsr.run() # doctest: +SKIP
Inputs:
[Mandatory]
in_file: (a pathlike object or string representing an existing file)
input diffusion weighted images
argument: ``%s``, position: -2
out_file: (a pathlike object or string representing a file, nipype
default value: dti.mif)
the output diffusion tensor image
argument: ``%s``, position: -1
[Optional]
in_mask: (a pathlike object or string representing an existing file)
only perform computation within the specified binary brain mask
image
argument: ``-mask %s``
method: ('nonlinear' or 'loglinear' or 'sech' or 'rician')
select method used to perform the fitting
argument: ``-method %s``
reg_term: (a float)
specify the strength of the regularisation term on the magnitude of
the tensor elements (default = 5000). This only applies to the non-
linear methods
argument: ``-regularisation %f``
nthreads: (an integer (int or long))
number of threads. if zero, the number of available cpus will be
used
argument: ``-nthreads %d``
grad_file: (a pathlike object or string representing an existing
file)
dw gradient scheme (MRTrix format)
argument: ``-grad %s``
mutually_exclusive: grad_fsl
grad_fsl: (a tuple of the form: (a pathlike object or string
representing an existing file, a pathlike object or string
representing an existing file))
(bvecs, bvals) dw gradient scheme (FSL format)
argument: ``-fslgrad %s %s``
mutually_exclusive: grad_file
bval_scale: ('yes' or 'no')
specifies whether the b - values should be scaled by the square of
the corresponding DW gradient norm, as often required for multishell
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).
argument: ``-bvalue_scaling %s``
in_bvec: (a pathlike object or string representing an existing file)
bvecs file in FSL format
argument: ``-fslgrad %s %s``
in_bval: (a pathlike object or string representing an existing file)
bvals file in FSL format
args: (a unicode string)
Additional parameters to the command
argument: ``%s``
environ: (a dictionary with keys which are a bytes or None or a value
of class 'str' and with values which are a bytes or None or a
value of class 'str', nipype default value: {})
Environment variables
Outputs:
out_file: (a pathlike object or string representing an existing file)
the output DTI file