.. AUTO-GENERATED FILE -- DO NOT EDIT!

interfaces.mrtrix3.preprocess
=============================


.. _nipype.interfaces.mrtrix3.preprocess.DWIDenoise:


.. index:: DWIDenoise

DWIDenoise
----------

`Link to code <file:///build/nipype-1.1.8/nipype/interfaces/mrtrix3/preprocess.py#L42>`__

Wraps the executable command ``dwidenoise``.

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.

For more information, see
<https://mrtrix.readthedocs.io/en/latest/reference/commands/dwidenoise.html>

Example
~~~~~~~

>>> import nipype.interfaces.mrtrix3 as mrt
>>> denoise = mrt.DWIDenoise()
>>> denoise.inputs.in_file = 'dwi.mif'
>>> denoise.inputs.mask = 'mask.mif'
>>> denoise.cmdline                               # doctest: +ELLIPSIS
'dwidenoise -mask mask.mif dwi.mif dwi_denoised.mif'
>>> denoise.run()                                 # doctest: +SKIP

Inputs::

        [Mandatory]
        in_file: (an existing file name)
                input DWI image
                argument: ``%s``, position: -2

        [Optional]
        noise: (a file name)
                noise map
                argument: ``-noise %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: (an existing file name)
                dw gradient scheme (MRTrix format
                argument: ``-grad %s``
        grad_fsl: (a tuple of the form: (an existing file name, an existing
                  file name))
                (bvecs, bvals) dw gradient scheme (FSL format
                argument: ``-fslgrad %s %s``
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        mask: (an existing file name)
                mask image
                argument: ``-mask %s``, position: 1
        bval_scale: (u'yes' or u'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``
        environ: (a dictionary with keys which are a newbytes or None or a
                  newstr or None and with values which are a newbytes or None or a
                  newstr or None, nipype default value: {})
                Environment variables
        extent: (a tuple of the form: (an integer (int or long), an integer
                  (int or long), an integer (int or long)))
                set the window size of the denoising filter. (default = 5,5,5)
                argument: ``-extent %d,%d,%d``
        in_bval: (an existing file name)
                bvals file in FSL format
        in_bvec: (an existing file name)
                bvecs file in FSL format
                argument: ``-fslgrad %s %s``
        out_file: (a file name)
                the output denoised DWI image
                argument: ``%s``, position: -1

Outputs::

        out_file: (an existing file name)
                the output denoised DWI image

.. _nipype.interfaces.mrtrix3.preprocess.ResponseSD:


.. index:: ResponseSD

ResponseSD
----------

`Link to code <file:///build/nipype-1.1.8/nipype/interfaces/mrtrix3/preprocess.py#L123>`__

Wraps the executable command ``dwi2response``.

Estimate response function(s) for spherical deconvolution using the specified algorithm.

Example
~~~~~~~

>>> import nipype.interfaces.mrtrix3 as mrt
>>> resp = mrt.ResponseSD()
>>> resp.inputs.in_file = 'dwi.mif'
>>> resp.inputs.algorithm = 'tournier'
>>> resp.inputs.grad_fsl = ('bvecs', 'bvals')
>>> resp.cmdline                               # doctest: +ELLIPSIS
'dwi2response tournier -fslgrad bvecs bvals -lmax 8 dwi.mif wm.txt'
>>> resp.run()                                 # doctest: +SKIP

# We can also pass in multiple harmonic degrees in the case of multi-shell
>>> resp.inputs.max_sh = [6,8,10]
>>> resp.cmdline
'dwi2response tournier -fslgrad bvecs bvals -lmax 6,8,10 dwi.mif wm.txt'

Inputs::

        [Mandatory]
        in_file: (an existing file name)
                input DWI image
                argument: ``%s``, position: -5
        algorithm: (u'msmt_5tt' or u'dhollander' or u'tournier' or u'tax')
                response estimation algorithm (multi-tissue)
                argument: ``%s``, position: 1

        [Optional]
        mtt_file: (a file name)
                input 5tt image
                argument: ``%s``, position: -4
        wm_file: (a file name, nipype default value: wm.txt)
                output WM response text file
                argument: ``%s``, position: -3
        gm_file: (a file name)
                output GM response text file
                argument: ``%s``, position: -2
        grad_file: (an existing file name)
                dw gradient scheme (MRTrix format
                argument: ``-grad %s``
        grad_fsl: (a tuple of the form: (an existing file name, an existing
                  file name))
                (bvecs, bvals) dw gradient scheme (FSL format
                argument: ``-fslgrad %s %s``
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        in_mask: (an existing file name)
                provide initial mask image
                argument: ``-mask %s``
        environ: (a dictionary with keys which are a newbytes or None or a
                  newstr or None and with values which are a newbytes or None or a
                  newstr or None, nipype default value: {})
                Environment variables
        bval_scale: (u'yes' or u'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_bval: (an existing file name)
                bvals file in FSL format
        csf_file: (a file name)
                output CSF response text file
                argument: ``%s``, position: -1
        in_bvec: (an existing file name)
                bvecs file in FSL format
                argument: ``-fslgrad %s %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``
        nthreads: (an integer (int or long))
                number of threads. if zero, the number of available cpus will be
                used
                argument: ``-nthreads %d``

Outputs::

        csf_file: (a file name)
                output CSF response text file
                argument: ``%s``
        wm_file: (a file name)
                output WM response text file
                argument: ``%s``
        gm_file: (a file name)
                output GM response text file
                argument: ``%s``
