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

interfaces.fsl.preprocess
=========================


.. _nipype.interfaces.fsl.preprocess.ApplyWarp:


.. index:: ApplyWarp

ApplyWarp
---------

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

Wraps the executable command ``applywarp``.

FSL's applywarp wrapper to apply the results of a FNIRT registration

Examples
~~~~~~~~
>>> from nipype.interfaces import fsl
>>> from nipype.testing import example_data
>>> aw = fsl.ApplyWarp()
>>> aw.inputs.in_file = example_data('structural.nii')
>>> aw.inputs.ref_file = example_data('mni.nii')
>>> aw.inputs.field_file = 'my_coefficients_filed.nii' #doctest: +SKIP
>>> res = aw.run() #doctest: +SKIP

Inputs::

        [Mandatory]
        ref_file: (an existing file name)
                reference image
                argument: ``--ref=%s``, position: 1
        in_file: (an existing file name)
                image to be warped
                argument: ``--in=%s``, position: 0

        [Optional]
        supersample: (a boolean)
                intermediary supersampling of output, default is off
                argument: ``--super``
        superlevel: (u'a' or an integer (int or long))
                level of intermediary supersampling, a for 'automatic' or integer
                level. Default = 2
                argument: ``--superlevel=%s``
        out_file: (a file name)
                output filename
                argument: ``--out=%s``, position: 2
        datatype: (u'char' or u'short' or u'int' or u'float' or u'double')
                Force output data type [char short int float double].
                argument: ``--datatype=%s``
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        interp: (u'nn' or u'trilinear' or u'sinc' or u'spline')
                interpolation method
                argument: ``--interp=%s``, position: -2
        field_file: (an existing file name)
                file containing warp field
                argument: ``--warp=%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
        premat: (an existing file name)
                filename for pre-transform (affine matrix)
                argument: ``--premat=%s``
        mask_file: (an existing file name)
                filename for mask image (in reference space)
                argument: ``--mask=%s``
        output_type: (u'NIFTI_PAIR' or u'NIFTI_PAIR_GZ' or u'NIFTI_GZ' or
                  u'NIFTI')
                FSL output type
        postmat: (an existing file name)
                filename for post-transform (affine matrix)
                argument: ``--postmat=%s``
        relwarp: (a boolean)
                treat warp field as relative: x' = x + w(x)
                argument: ``--rel``, position: -1
                mutually_exclusive: abswarp
        abswarp: (a boolean)
                treat warp field as absolute: x' = w(x)
                argument: ``--abs``
                mutually_exclusive: relwarp

Outputs::

        out_file: (an existing file name)
                Warped output file

References:
~~~~~~~~~~~
None

.. _nipype.interfaces.fsl.preprocess.ApplyXFM:


.. index:: ApplyXFM

ApplyXFM
--------

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

Wraps the executable command ``flirt``.

Currently just a light wrapper around FLIRT,
with no modifications

ApplyXFM is used to apply an existing tranform to an image


Examples
~~~~~~~~

>>> import nipype.interfaces.fsl as fsl
>>> from nipype.testing import example_data
>>> applyxfm = fsl.preprocess.ApplyXFM()
>>> applyxfm.inputs.in_file = example_data('structural.nii')
>>> applyxfm.inputs.in_matrix_file = example_data('trans.mat')
>>> applyxfm.inputs.out_file = 'newfile.nii'
>>> applyxfm.inputs.reference = example_data('mni.nii')
>>> applyxfm.inputs.apply_xfm = True
>>> result = applyxfm.run() # doctest: +SKIP

Inputs::

        [Mandatory]
        in_file: (an existing file name)
                input file
                argument: ``-in %s``, position: 0
        reference: (an existing file name)
                reference file
                argument: ``-ref %s``, position: 1

        [Optional]
        rigid2D: (a boolean)
                use 2D rigid body mode - ignores dof
                argument: ``-2D``
        in_matrix_file: (a file name)
                input 4x4 affine matrix
                argument: ``-init %s``
        verbose: (an integer (int or long))
                verbose mode, 0 is least
                argument: ``-verbose %d``
        bgvalue: (a float)
                use specified background value for points outside FOV
                argument: ``-setbackground %f``
        padding_size: (an integer (int or long))
                for applyxfm: interpolates outside image by size
                argument: ``-paddingsize %d``
        sinc_window: (u'rectangular' or u'hanning' or u'blackman')
                sinc window
                argument: ``-sincwindow %s``
        interp: (u'trilinear' or u'nearestneighbour' or u'sinc' or u'spline')
                final interpolation method used in reslicing
                argument: ``-interp %s``
        wmnorms: (a file name)
                white matter boundary normals for BBR cost function
                argument: ``-wmnorms %s``
        cost: (u'mutualinfo' or u'corratio' or u'normcorr' or u'normmi' or
                  u'leastsq' or u'labeldiff' or u'bbr')
                cost function
                argument: ``-cost %s``
        no_resample: (a boolean)
                do not change input sampling
                argument: ``-noresample``
        sinc_width: (an integer (int or long))
                full-width in voxels
                argument: ``-sincwidth %d``
        in_weight: (an existing file name)
                File for input weighting volume
                argument: ``-inweight %s``
        fieldmap: (a file name)
                fieldmap image in rads/s - must be already registered to the
                reference image
                argument: ``-fieldmap %s``
        echospacing: (a float)
                value of EPI echo spacing - units of seconds
                argument: ``-echospacing %f``
        ref_weight: (an existing file name)
                File for reference weighting volume
                argument: ``-refweight %s``
        apply_isoxfm: (a float)
                as applyxfm but forces isotropic resampling
                argument: ``-applyisoxfm %f``
                mutually_exclusive: apply_xfm
        fieldmapmask: (a file name)
                mask for fieldmap image
                argument: ``-fieldmapmask %s``
        bbrtype: (u'signed' or u'global_abs' or u'local_abs')
                type of bbr cost function: signed [default], global_abs, local_abs
                argument: ``-bbrtype %s``
        no_clamp: (a boolean)
                do not use intensity clamping
                argument: ``-noclamp``
        force_scaling: (a boolean)
                force rescaling even for low-res images
                argument: ``-forcescaling``
        pedir: (an integer (int or long))
                phase encode direction of EPI - 1/2/3=x/y/z & -1/-2/-3=-x/-y/-z
                argument: ``-pedir %d``
        display_init: (a boolean)
                display initial matrix
                argument: ``-displayinit``
        schedule: (an existing file name)
                replaces default schedule
                argument: ``-schedule %s``
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        uses_qform: (a boolean)
                initialize using sform or qform
                argument: ``-usesqform``
        wmcoords: (a file name)
                white matter boundary coordinates for BBR cost function
                argument: ``-wmcoords %s``
        fine_search: (an integer (int or long))
                fine search delta angle
                argument: ``-finesearch %d``
        coarse_search: (an integer (int or long))
                coarse search delta angle
                argument: ``-coarsesearch %d``
        angle_rep: (u'quaternion' or u'euler')
                representation of rotation angles
                argument: ``-anglerep %s``
        no_search: (a boolean)
                set all angular searches to ranges 0 to 0
                argument: ``-nosearch``
        apply_xfm: (a boolean, nipype default value: True)
                apply transformation supplied by in_matrix_file or uses_qform to use
                the affine matrix stored in the reference header
                argument: ``-applyxfm``
        wm_seg: (a file name)
                white matter segmentation volume needed by BBR cost function
                argument: ``-wmseg %s``
        out_file: (a file name)
                registered output file
                argument: ``-out %s``, position: 2
        bbrslope: (a float)
                value of bbr slope
                argument: ``-bbrslope %f``
        datatype: (u'char' or u'short' or u'int' or u'float' or u'double')
                force output data type
                argument: ``-datatype %s``
        save_log: (a boolean)
                save to log file
        dof: (an integer (int or long))
                number of transform degrees of freedom
                argument: ``-dof %d``
        out_matrix_file: (a file name)
                output affine matrix in 4x4 asciii format
                argument: ``-omat %s``, position: 3
        no_resample_blur: (a boolean)
                do not use blurring on downsampling
                argument: ``-noresampblur``
        min_sampling: (a float)
                set minimum voxel dimension for sampling
                argument: ``-minsampling %f``
        cost_func: (u'mutualinfo' or u'corratio' or u'normcorr' or u'normmi'
                  or u'leastsq' or u'labeldiff' or u'bbr')
                cost function
                argument: ``-searchcost %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
        searchr_x: (a list of from 2 to 2 items which are an integer (int or
                  long))
                search angles along x-axis, in degrees
                argument: ``-searchrx %s``
        out_log: (a file name)
                output log
                requires: save_log
        output_type: (u'NIFTI_PAIR' or u'NIFTI_PAIR_GZ' or u'NIFTI_GZ' or
                  u'NIFTI')
                FSL output type
        searchr_z: (a list of from 2 to 2 items which are an integer (int or
                  long))
                search angles along z-axis, in degrees
                argument: ``-searchrz %s``
        bins: (an integer (int or long))
                number of histogram bins
                argument: ``-bins %d``
        searchr_y: (a list of from 2 to 2 items which are an integer (int or
                  long))
                search angles along y-axis, in degrees
                argument: ``-searchry %s``

Outputs::

        out_log: (a file name)
                path/name of output log (if generated)
        out_file: (an existing file name)
                path/name of registered file (if generated)
        out_matrix_file: (an existing file name)
                path/name of calculated affine transform (if generated)

References:
~~~~~~~~~~~
None

.. _nipype.interfaces.fsl.preprocess.BET:


.. index:: BET

BET
---

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

Wraps the executable command ``bet``.

FSL BET wrapper for skull stripping

For complete details, see the `BET Documentation.
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/BET/UserGuide>`_

Examples
~~~~~~~~
>>> from nipype.interfaces import fsl
>>> btr = fsl.BET()
>>> btr.inputs.in_file = 'structural.nii'
>>> btr.inputs.frac = 0.7
>>> btr.inputs.out_file = 'brain_anat.nii'
>>> btr.cmdline
'bet structural.nii brain_anat.nii -f 0.70'
>>> res = btr.run() # doctest: +SKIP

Inputs::

        [Mandatory]
        in_file: (an existing file name)
                input file to skull strip
                argument: ``%s``, position: 0

        [Optional]
        remove_eyes: (a boolean)
                eye & optic nerve cleanup (can be useful in SIENA)
                argument: ``-S``
                mutually_exclusive: functional, reduce_bias, robust, padding,
                  remove_eyes, surfaces, t2_guided
        no_output: (a boolean)
                Don't generate segmented output
                argument: ``-n``
        out_file: (a file name)
                name of output skull stripped image
                argument: ``%s``, position: 1
        functional: (a boolean)
                apply to 4D fMRI data
                argument: ``-F``
                mutually_exclusive: functional, reduce_bias, robust, padding,
                  remove_eyes, surfaces, t2_guided
        radius: (an integer (int or long))
                head radius
                argument: ``-r %d``
        threshold: (a boolean)
                apply thresholding to segmented brain image and mask
                argument: ``-t``
        surfaces: (a boolean)
                run bet2 and then betsurf to get additional skull and scalp surfaces
                (includes registrations)
                argument: ``-A``
                mutually_exclusive: functional, reduce_bias, robust, padding,
                  remove_eyes, surfaces, t2_guided
        t2_guided: (a file name)
                as with creating surfaces, when also feeding in non-brain-extracted
                T2 (includes registrations)
                argument: ``-A2 %s``
                mutually_exclusive: functional, reduce_bias, robust, padding,
                  remove_eyes, surfaces, t2_guided
        vertical_gradient: (a float)
                vertical gradient in fractional intensity threshold (-1, 1)
                argument: ``-g %.2f``
        frac: (a float)
                fractional intensity threshold
                argument: ``-f %.2f``
        reduce_bias: (a boolean)
                bias field and neck cleanup
                argument: ``-B``
                mutually_exclusive: functional, reduce_bias, robust, padding,
                  remove_eyes, surfaces, t2_guided
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        padding: (a boolean)
                improve BET if FOV is very small in Z (by temporarily padding end
                slices)
                argument: ``-Z``
                mutually_exclusive: functional, reduce_bias, robust, padding,
                  remove_eyes, surfaces, t2_guided
        mesh: (a boolean)
                generate a vtk mesh brain surface
                argument: ``-e``
        robust: (a boolean)
                robust brain centre estimation (iterates BET several times)
                argument: ``-R``
                mutually_exclusive: functional, reduce_bias, robust, padding,
                  remove_eyes, surfaces, t2_guided
        center: (a list of at most 3 items which are an integer (int or
                  long))
                center of gravity in voxels
                argument: ``-c %s``
        outline: (a boolean)
                create surface outline image
                argument: ``-o``
        skull: (a boolean)
                create skull image
                argument: ``-s``
        mask: (a boolean)
                create binary mask image
                argument: ``-m``
        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
        output_type: (u'NIFTI_PAIR' or u'NIFTI_PAIR_GZ' or u'NIFTI_GZ' or
                  u'NIFTI')
                FSL output type

Outputs::

        outline_file: (a file name)
                path/name of outline file (if generated)
        inskull_mask_file: (a file name)
                path/name of inskull mask (if generated)
        out_file: (a file name)
                path/name of skullstripped file (if generated)
        meshfile: (a file name)
                path/name of vtk mesh file (if generated)
        inskull_mesh_file: (a file name)
                path/name of inskull mesh outline (if generated)
        outskin_mask_file: (a file name)
                path/name of outskin mask (if generated)
        outskull_mesh_file: (a file name)
                path/name of outskull mesh outline (if generated)
        skull_mask_file: (a file name)
                path/name of skull mask (if generated)
        mask_file: (a file name)
                path/name of binary brain mask (if generated)
        outskin_mesh_file: (a file name)
                path/name of outskin mesh outline (if generated)
        outskull_mask_file: (a file name)
                path/name of outskull mask (if generated)

References:
~~~~~~~~~~~
None

.. _nipype.interfaces.fsl.preprocess.FAST:


.. index:: FAST

FAST
----

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

Wraps the executable command ``fast``.

FSL FAST wrapper for segmentation and bias correction

For complete details, see the `FAST Documentation.
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FAST>`_

Examples
~~~~~~~~
>>> from nipype.interfaces import fsl
>>> fastr = fsl.FAST()
>>> fastr.inputs.in_files = 'structural.nii'
>>> fastr.inputs.out_basename = 'fast_'
>>> fastr.cmdline
'fast -o fast_ -S 1 structural.nii'
>>> out = fastr.run()  # doctest: +SKIP

Inputs::

        [Mandatory]
        in_files: (a list of items which are an existing file name)
                image, or multi-channel set of images, to be segmented
                argument: ``%s``, position: -1

        [Optional]
        number_classes: (1 <= an integer <= 10)
                number of tissue-type classes
                argument: ``-n %d``
        out_basename: (a file name)
                base name of output files
                argument: ``-o %s``
        hyper: (0.0 <= a floating point number <= 1.0)
                segmentation spatial smoothness
                argument: ``-H %.2f``
        verbose: (a boolean)
                switch on diagnostic messages
                argument: ``-v``
        init_seg_smooth: (0.0001 <= a floating point number <= 0.1)
                initial segmentation spatial smoothness (during bias field
                estimation)
                argument: ``-f %.3f``
        no_pve: (a boolean)
                turn off PVE (partial volume estimation)
                argument: ``--nopve``
        output_biascorrected: (a boolean)
                output restored image (bias-corrected image)
                argument: ``-B``
        mixel_smooth: (0.0 <= a floating point number <= 1.0)
                spatial smoothness for mixeltype
                argument: ``-R %.2f``
        segments: (a boolean)
                outputs a separate binary image for each tissue type
                argument: ``-g``
        iters_afterbias: (1 <= an integer <= 20)
                number of main-loop iterations after bias-field removal
                argument: ``-O %d``
        bias_lowpass: (4 <= an integer <= 40)
                bias field smoothing extent (FWHM) in mm
                argument: ``-l %d``
        other_priors: (a list of from 3 to 3 items which are a file name)
                alternative prior images
                argument: ``-A %s``
        img_type: (1 or 2 or 3)
                int specifying type of image: (1 = T1, 2 = T2, 3 = PD)
                argument: ``-t %d``
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        probability_maps: (a boolean)
                outputs individual probability maps
                argument: ``-p``
        manual_seg: (an existing file name)
                Filename containing intensities
                argument: ``-s %s``
        output_biasfield: (a boolean)
                output estimated bias field
                argument: ``-b``
        no_bias: (a boolean)
                do not remove bias field
                argument: ``-N``
        use_priors: (a boolean)
                use priors throughout
                argument: ``-P``
        init_transform: (an existing file name)
                <standard2input.mat> initialise using priors
                argument: ``-a %s``
        segment_iters: (1 <= an integer <= 50)
                number of segmentation-initialisation iterations
                argument: ``-W %d``
        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
        output_type: (u'NIFTI_PAIR' or u'NIFTI_PAIR_GZ' or u'NIFTI_GZ' or
                  u'NIFTI')
                FSL output type
        bias_iters: (1 <= an integer <= 10)
                number of main-loop iterations during bias-field removal
                argument: ``-I %d``

Outputs::

        partial_volume_files: (a list of items which are a file name)
        tissue_class_files: (a list of items which are a file name)
        mixeltype: (a file name)
                path/name of mixeltype volume file _mixeltype
        restored_image: (a list of items which are a file name)
        tissue_class_map: (an existing file name)
                path/name of binary segmented volume file one val for each class
                _seg
        partial_volume_map: (a file name)
                path/name of partial volume file _pveseg
        probability_maps: (a list of items which are a file name)
        bias_field: (a list of items which are a file name)

References:
~~~~~~~~~~~
None

.. _nipype.interfaces.fsl.preprocess.FIRST:


.. index:: FIRST

FIRST
-----

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

Wraps the executable command ``run_first_all``.

FSL run_first_all wrapper for segmentation of subcortical volumes

http://www.fmrib.ox.ac.uk/fsl/first/index.html

Examples
~~~~~~~~

>>> from nipype.interfaces import fsl
>>> first = fsl.FIRST()
>>> first.inputs.in_file = 'structural.nii'
>>> first.inputs.out_file = 'segmented.nii'
>>> res = first.run() #doctest: +SKIP

Inputs::

        [Mandatory]
        in_file: (an existing file name)
                input data file
                argument: ``-i %s``, position: -2
        out_file: (a file name, nipype default value: segmented)
                output data file
                argument: ``-o %s``, position: -1

        [Optional]
        affine_file: (an existing file name)
                Affine matrix to use (e.g. img2std.mat) (does not re-run
                registration)
                argument: ``-a %s``, position: 6
        list_of_specific_structures: (a list of at least 1 items which are a
                  unicode string)
                Runs only on the specified structures (e.g. L_Hipp, R_HippL_Accu,
                R_Accu, L_Amyg, R_AmygL_Caud, R_Caud, L_Pall, R_PallL_Puta, R_Puta,
                L_Thal, R_Thal, BrStem
                argument: ``-s %s``, position: 5
        verbose: (a boolean)
                Use verbose logging.
                argument: ``-v``, position: 1
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        no_cleanup: (a boolean)
                Input structural image is already brain-extracted
                argument: ``-d``, position: 3
        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
        method_as_numerical_threshold: (a float)
                Specify a numerical threshold value or use the 'method' input to
                choose auto, fast, or none
                argument: ``-m %.4f``, position: 4
        output_type: (u'NIFTI_PAIR' or u'NIFTI_PAIR_GZ' or u'NIFTI_GZ' or
                  u'NIFTI')
                FSL output type
        brain_extracted: (a boolean)
                Input structural image is already brain-extracted
                argument: ``-b``, position: 2
        method: (u'auto' or u'fast' or u'none', nipype default value: auto)
                Method must be one of auto, fast, none, or it can be entered using
                the 'method_as_numerical_threshold' input
                argument: ``-m %s``, position: 4
                mutually_exclusive: method_as_numerical_threshold

Outputs::

        vtk_surfaces: (a list of items which are an existing file name)
                VTK format meshes for each subcortical region
        segmentation_file: (an existing file name)
                4D image file containing a single volume per segmented region
        bvars: (a list of items which are an existing file name)
                bvars for each subcortical region
        original_segmentations: (an existing file name)
                3D image file containing the segmented regions as integer values.
                Uses CMA labelling

References:
~~~~~~~~~~~
None

.. _nipype.interfaces.fsl.preprocess.FLIRT:


.. index:: FLIRT

FLIRT
-----

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

Wraps the executable command ``flirt``.

FSL FLIRT wrapper for coregistration

For complete details, see the `FLIRT Documentation.
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FLIRT>`_

To print out the command line help, use:
    fsl.FLIRT().inputs_help()

Examples
~~~~~~~~
>>> from nipype.interfaces import fsl
>>> from nipype.testing import example_data
>>> flt = fsl.FLIRT(bins=640, cost_func='mutualinfo')
>>> flt.inputs.in_file = 'structural.nii'
>>> flt.inputs.reference = 'mni.nii'
>>> flt.inputs.output_type = "NIFTI_GZ"
>>> flt.cmdline # doctest: +ELLIPSIS
'flirt -in structural.nii -ref mni.nii -out structural_flirt.nii.gz -omat structural_flirt.mat -bins 640 -searchcost mutualinfo'
>>> res = flt.run() #doctest: +SKIP

Inputs::

        [Mandatory]
        in_file: (an existing file name)
                input file
                argument: ``-in %s``, position: 0
        reference: (an existing file name)
                reference file
                argument: ``-ref %s``, position: 1

        [Optional]
        rigid2D: (a boolean)
                use 2D rigid body mode - ignores dof
                argument: ``-2D``
        in_matrix_file: (a file name)
                input 4x4 affine matrix
                argument: ``-init %s``
        verbose: (an integer (int or long))
                verbose mode, 0 is least
                argument: ``-verbose %d``
        bgvalue: (a float)
                use specified background value for points outside FOV
                argument: ``-setbackground %f``
        padding_size: (an integer (int or long))
                for applyxfm: interpolates outside image by size
                argument: ``-paddingsize %d``
        sinc_window: (u'rectangular' or u'hanning' or u'blackman')
                sinc window
                argument: ``-sincwindow %s``
        interp: (u'trilinear' or u'nearestneighbour' or u'sinc' or u'spline')
                final interpolation method used in reslicing
                argument: ``-interp %s``
        wmnorms: (a file name)
                white matter boundary normals for BBR cost function
                argument: ``-wmnorms %s``
        cost: (u'mutualinfo' or u'corratio' or u'normcorr' or u'normmi' or
                  u'leastsq' or u'labeldiff' or u'bbr')
                cost function
                argument: ``-cost %s``
        no_resample: (a boolean)
                do not change input sampling
                argument: ``-noresample``
        sinc_width: (an integer (int or long))
                full-width in voxels
                argument: ``-sincwidth %d``
        in_weight: (an existing file name)
                File for input weighting volume
                argument: ``-inweight %s``
        fieldmap: (a file name)
                fieldmap image in rads/s - must be already registered to the
                reference image
                argument: ``-fieldmap %s``
        no_search: (a boolean)
                set all angular searches to ranges 0 to 0
                argument: ``-nosearch``
        ref_weight: (an existing file name)
                File for reference weighting volume
                argument: ``-refweight %s``
        apply_isoxfm: (a float)
                as applyxfm but forces isotropic resampling
                argument: ``-applyisoxfm %f``
                mutually_exclusive: apply_xfm
        fieldmapmask: (a file name)
                mask for fieldmap image
                argument: ``-fieldmapmask %s``
        bbrtype: (u'signed' or u'global_abs' or u'local_abs')
                type of bbr cost function: signed [default], global_abs, local_abs
                argument: ``-bbrtype %s``
        no_clamp: (a boolean)
                do not use intensity clamping
                argument: ``-noclamp``
        force_scaling: (a boolean)
                force rescaling even for low-res images
                argument: ``-forcescaling``
        pedir: (an integer (int or long))
                phase encode direction of EPI - 1/2/3=x/y/z & -1/-2/-3=-x/-y/-z
                argument: ``-pedir %d``
        display_init: (a boolean)
                display initial matrix
                argument: ``-displayinit``
        schedule: (an existing file name)
                replaces default schedule
                argument: ``-schedule %s``
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        uses_qform: (a boolean)
                initialize using sform or qform
                argument: ``-usesqform``
        out_log: (a file name)
                output log
                requires: save_log
        wmcoords: (a file name)
                white matter boundary coordinates for BBR cost function
                argument: ``-wmcoords %s``
        fine_search: (an integer (int or long))
                fine search delta angle
                argument: ``-finesearch %d``
        angle_rep: (u'quaternion' or u'euler')
                representation of rotation angles
                argument: ``-anglerep %s``
        echospacing: (a float)
                value of EPI echo spacing - units of seconds
                argument: ``-echospacing %f``
        apply_xfm: (a boolean)
                apply transformation supplied by in_matrix_file or uses_qform to use
                the affine matrix stored in the reference header
                argument: ``-applyxfm``
        wm_seg: (a file name)
                white matter segmentation volume needed by BBR cost function
                argument: ``-wmseg %s``
        out_file: (a file name)
                registered output file
                argument: ``-out %s``, position: 2
        bbrslope: (a float)
                value of bbr slope
                argument: ``-bbrslope %f``
        datatype: (u'char' or u'short' or u'int' or u'float' or u'double')
                force output data type
                argument: ``-datatype %s``
        searchr_z: (a list of from 2 to 2 items which are an integer (int or
                  long))
                search angles along z-axis, in degrees
                argument: ``-searchrz %s``
        dof: (an integer (int or long))
                number of transform degrees of freedom
                argument: ``-dof %d``
        out_matrix_file: (a file name)
                output affine matrix in 4x4 asciii format
                argument: ``-omat %s``, position: 3
        no_resample_blur: (a boolean)
                do not use blurring on downsampling
                argument: ``-noresampblur``
        min_sampling: (a float)
                set minimum voxel dimension for sampling
                argument: ``-minsampling %f``
        cost_func: (u'mutualinfo' or u'corratio' or u'normcorr' or u'normmi'
                  or u'leastsq' or u'labeldiff' or u'bbr')
                cost function
                argument: ``-searchcost %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
        bins: (an integer (int or long))
                number of histogram bins
                argument: ``-bins %d``
        coarse_search: (an integer (int or long))
                coarse search delta angle
                argument: ``-coarsesearch %d``
        output_type: (u'NIFTI_PAIR' or u'NIFTI_PAIR_GZ' or u'NIFTI_GZ' or
                  u'NIFTI')
                FSL output type
        save_log: (a boolean)
                save to log file
        searchr_x: (a list of from 2 to 2 items which are an integer (int or
                  long))
                search angles along x-axis, in degrees
                argument: ``-searchrx %s``
        searchr_y: (a list of from 2 to 2 items which are an integer (int or
                  long))
                search angles along y-axis, in degrees
                argument: ``-searchry %s``

Outputs::

        out_log: (a file name)
                path/name of output log (if generated)
        out_file: (an existing file name)
                path/name of registered file (if generated)
        out_matrix_file: (an existing file name)
                path/name of calculated affine transform (if generated)

References:
~~~~~~~~~~~
None

.. _nipype.interfaces.fsl.preprocess.FNIRT:


.. index:: FNIRT

FNIRT
-----

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

Wraps the executable command ``fnirt``.

FSL FNIRT wrapper for non-linear registration

For complete details, see the `FNIRT Documentation.
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FNIRT>`_

Examples
~~~~~~~~
>>> from nipype.interfaces import fsl
>>> from nipype.testing import example_data
>>> fnt = fsl.FNIRT(affine_file=example_data('trans.mat'))
>>> res = fnt.run(ref_file=example_data('mni.nii', in_file=example_data('structural.nii')) #doctest: +SKIP

T1 -> Mni153

>>> from nipype.interfaces import fsl
>>> fnirt_mprage = fsl.FNIRT()
>>> fnirt_mprage.inputs.in_fwhm = [8, 4, 2, 2]
>>> fnirt_mprage.inputs.subsampling_scheme = [4, 2, 1, 1]

Specify the resolution of the warps

>>> fnirt_mprage.inputs.warp_resolution = (6, 6, 6)
>>> res = fnirt_mprage.run(in_file='structural.nii', ref_file='mni.nii', warped_file='warped.nii', fieldcoeff_file='fieldcoeff.nii')#doctest: +SKIP

We can check the command line and confirm that it's what we expect.

>>> fnirt_mprage.cmdline  #doctest: +SKIP
'fnirt --cout=fieldcoeff.nii --in=structural.nii --infwhm=8,4,2,2 --ref=mni.nii --subsamp=4,2,1,1 --warpres=6,6,6 --iout=warped.nii'

Inputs::

        [Mandatory]
        ref_file: (an existing file name)
                name of reference image
                argument: ``--ref=%s``
        in_file: (an existing file name)
                name of input image
                argument: ``--in=%s``

        [Optional]
        derive_from_ref: (a boolean)
                If true, ref image is used to calculate derivatives. Default false
                argument: ``--refderiv``
        in_intensitymap_file: (a list of from 1 to 2 items which are an
                  existing file name)
                name of file/files containing initial intensity mapping usually
                generated by previous fnirt run
                argument: ``--intin=%s``
        modulatedref_file: (a boolean or a file name)
                name of file for writing out intensity modulated --ref (for
                diagnostic purposes)
                argument: ``--refout=%s``
        refmask_val: (a float)
                Value to mask out in --ref image. Default =0.0
                argument: ``--imprefval=%f``
        hessian_precision: (u'double' or u'float')
                Precision for representing Hessian, double or float. Default double
                argument: ``--numprec=%s``
        skip_implicit_in_masking: (a boolean)
                skip implicit masking based on value in --in image. Default = 0
                argument: ``--impinm=0``
        inmask_file: (an existing file name)
                name of file with mask in input image space
                argument: ``--inmask=%s``
        refmask_file: (an existing file name)
                name of file with mask in reference space
                argument: ``--refmask=%s``
        apply_refmask: (a list of items which are 0 or 1)
                list of iterations to use reference mask on (1 to use, 0 to skip)
                argument: ``--applyrefmask=%s``
                mutually_exclusive: skip_refmask
        skip_lambda_ssq: (a boolean)
                If true, lambda is not weighted by current ssq, default false
                argument: ``--ssqlambda=0``
        intensity_mapping_model: (u'none' or u'global_linear' or
                  u'global_non_linear' or u'local_linear' or
                  u'global_non_linear_with_bias' or u'local_non_linear')
                Model for intensity-mapping
                argument: ``--intmod=%s``
        affine_file: (an existing file name)
                name of file containing affine transform
                argument: ``--aff=%s``
        apply_inmask: (a list of items which are 0 or 1)
                list of iterations to use input mask on (1 to use, 0 to skip)
                argument: ``--applyinmask=%s``
                mutually_exclusive: skip_inmask
        spline_order: (an integer (int or long))
                Order of spline, 2->Qadratic spline, 3->Cubic spline. Default=3
                argument: ``--splineorder=%d``
        inwarp_file: (an existing file name)
                name of file containing initial non-linear warps
                argument: ``--inwarp=%s``
        subsampling_scheme: (a list of items which are an integer (int or
                  long))
                sub-sampling scheme, list, default [4, 2, 1, 1]
                argument: ``--subsamp=%s``
        warped_file: (a file name)
                name of output image
                argument: ``--iout=%s``
        skip_refmask: (a boolean)
                Skip specified refmask if set, default false
                argument: ``--applyrefmask=0``
                mutually_exclusive: apply_refmask
        ref_fwhm: (a list of items which are an integer (int or long))
                FWHM (in mm) of gaussian smoothing kernel for ref volume, default
                [4, 2, 0, 0]
                argument: ``--reffwhm=%s``
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        config_file: (u'T1_2_MNI152_2mm' or u'FA_2_FMRIB58_1mm' or an
                  existing file name)
                Name of config file specifying command line arguments
                argument: ``--config=%s``
        skip_inmask: (a boolean)
                skip specified inmask if set, default false
                argument: ``--applyinmask=0``
                mutually_exclusive: apply_inmask
        field_file: (a boolean or a file name)
                name of output file with field or true
                argument: ``--fout=%s``
        inmask_val: (a float)
                Value to mask out in --in image. Default =0.0
                argument: ``--impinval=%f``
        apply_intensity_mapping: (a list of items which are 0 or 1)
                List of subsampling levels to apply intensity mapping for (0 to
                skip, 1 to apply)
                argument: ``--estint=%s``
                mutually_exclusive: skip_intensity_mapping
        regularization_lambda: (a list of items which are a float)
                Weight of regularisation, default depending on --ssqlambda and
                --regmod switches. See user documetation.
                argument: ``--lambda=%s``
        regularization_model: (u'membrane_energy' or u'bending_energy')
                Model for regularisation of warp-field [membrane_energy
                bending_energy], default bending_energy
                argument: ``--regmod=%s``
        jacobian_range: (a tuple of the form: (a float, a float))
                Allowed range of Jacobian determinants, default 0.01, 100.0
                argument: ``--jacrange=%f,%f``
        out_intensitymap_file: (a boolean or a file name)
                name of files for writing information pertaining to intensity
                mapping
                argument: ``--intout=%s``
        skip_implicit_ref_masking: (a boolean)
                skip implicit masking based on value in --ref image. Default = 0
                argument: ``--imprefm=0``
        log_file: (a file name)
                Name of log-file
                argument: ``--logout=%s``
        biasfield_resolution: (a tuple of the form: (an integer (int or
                  long), an integer (int or long), an integer (int or long)))
                Resolution (in mm) of bias-field modelling local intensities,
                default 50, 50, 50
                argument: ``--biasres=%d,%d,%d``
        fieldcoeff_file: (a boolean or a file name)
                name of output file with field coefficients or true
                argument: ``--cout=%s``
        warp_resolution: (a tuple of the form: (an integer (int or long), an
                  integer (int or long), an integer (int or long)))
                (approximate) resolution (in mm) of warp basis in x-, y- and
                z-direction, default 10, 10, 10
                argument: ``--warpres=%d,%d,%d``
        jacobian_file: (a boolean or a file name)
                name of file for writing out the Jacobian of the field (for
                diagnostic or VBM purposes)
                argument: ``--jout=%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
        output_type: (u'NIFTI_PAIR' or u'NIFTI_PAIR_GZ' or u'NIFTI_GZ' or
                  u'NIFTI')
                FSL output type
        skip_intensity_mapping: (a boolean)
                Skip estimate intensity-mapping default false
                argument: ``--estint=0``
                mutually_exclusive: apply_intensity_mapping
        in_fwhm: (a list of items which are an integer (int or long))
                FWHM (in mm) of gaussian smoothing kernel for input volume, default
                [6, 4, 2, 2]
                argument: ``--infwhm=%s``
        bias_regularization_lambda: (a float)
                Weight of regularisation for bias-field, default 10000
                argument: ``--biaslambda=%f``
        intensity_mapping_order: (an integer (int or long))
                Order of poynomial for mapping intensities, default 5
                argument: ``--intorder=%d``
        max_nonlin_iter: (a list of items which are an integer (int or long))
                Max # of non-linear iterations list, default [5, 5, 5, 5]
                argument: ``--miter=%s``

Outputs::

        modulatedref_file: (a file name)
                file containing intensity modulated --ref
        fieldcoeff_file: (an existing file name)
                file with field coefficients
        jacobian_file: (a file name)
                file containing Jacobian of the field
        field_file: (a file name)
                file with warp field
        warped_file: (an existing file name)
                warped image
        log_file: (a file name)
                Name of log-file
        out_intensitymap_file: (a list of from 2 to 2 items which are a file
                  name)
                files containing info pertaining to intensity mapping

References:
~~~~~~~~~~~
None

.. _nipype.interfaces.fsl.preprocess.FUGUE:


.. index:: FUGUE

FUGUE
-----

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

Wraps the executable command ``fugue``.

FSL FUGUE set of tools for EPI distortion correction

`FUGUE <http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FUGUE>`_ is, most generally,
a set of tools for EPI distortion correction.

Distortions may be corrected for
    1. improving registration with non-distorted images (e.g. structurals),
       or
    2. dealing with motion-dependent changes.

FUGUE is designed to deal only with the first case -
improving registration.


Examples
~~~~~~~~


Unwarping an input image (shift map is known):

>>> from nipype.interfaces.fsl.preprocess import FUGUE
>>> fugue = FUGUE()
>>> fugue.inputs.in_file = 'epi.nii'
>>> fugue.inputs.mask_file = 'epi_mask.nii'
>>> fugue.inputs.shift_in_file = 'vsm.nii'  # Previously computed with fugue as well
>>> fugue.inputs.unwarp_direction = 'y'
>>> fugue.inputs.output_type = "NIFTI_GZ"
>>> fugue.cmdline # doctest: +ELLIPSIS
'fugue --in=epi.nii --mask=epi_mask.nii --loadshift=vsm.nii --unwarpdir=y --unwarp=epi_unwarped.nii.gz'
>>> fugue.run() #doctest: +SKIP


Warping an input image (shift map is known):

>>> from nipype.interfaces.fsl.preprocess import FUGUE
>>> fugue = FUGUE()
>>> fugue.inputs.in_file = 'epi.nii'
>>> fugue.inputs.forward_warping = True
>>> fugue.inputs.mask_file = 'epi_mask.nii'
>>> fugue.inputs.shift_in_file = 'vsm.nii'  # Previously computed with fugue as well
>>> fugue.inputs.unwarp_direction = 'y'
>>> fugue.inputs.output_type = "NIFTI_GZ"
>>> fugue.cmdline # doctest: +ELLIPSIS
'fugue --in=epi.nii --mask=epi_mask.nii --loadshift=vsm.nii --unwarpdir=y --warp=epi_warped.nii.gz'
>>> fugue.run() #doctest: +SKIP


Computing the vsm (unwrapped phase map is known):

>>> from nipype.interfaces.fsl.preprocess import FUGUE
>>> fugue = FUGUE()
>>> fugue.inputs.phasemap_in_file = 'epi_phasediff.nii'
>>> fugue.inputs.mask_file = 'epi_mask.nii'
>>> fugue.inputs.dwell_to_asym_ratio = (0.77e-3 * 3) / 2.46e-3
>>> fugue.inputs.unwarp_direction = 'y'
>>> fugue.inputs.save_shift = True
>>> fugue.inputs.output_type = "NIFTI_GZ"
>>> fugue.cmdline # doctest: +ELLIPSIS
'fugue --dwelltoasym=0.9390243902 --mask=epi_mask.nii --phasemap=epi_phasediff.nii --saveshift=epi_phasediff_vsm.nii.gz --unwarpdir=y'
>>> fugue.run() #doctest: +SKIP

Inputs::

        [Optional]
        dwell_time: (a float)
                set the EPI dwell time per phase-encode line - same as echo spacing
                - (sec)
                argument: ``--dwell=%.10f``
        asym_se_time: (a float)
                set the fieldmap asymmetric spin echo time (sec)
                argument: ``--asym=%.10f``
        smooth3d: (a float)
                apply 3D Gaussian smoothing of sigma N (in mm)
                argument: ``--smooth3=%.2f``
        no_gap_fill: (a boolean)
                do not apply gap-filling measure to the fieldmap
                argument: ``--nofill``
        forward_warping: (a boolean, nipype default value: False)
                apply forward warping instead of unwarping
        save_shift: (a boolean)
                write pixel shift volume
                mutually_exclusive: save_unmasked_shift
        poly_order: (an integer (int or long))
                apply polynomial fitting of order N
                argument: ``--poly=%d``
        shift_in_file: (an existing file name)
                filename for reading pixel shift volume
                argument: ``--loadshift=%s``
        shift_out_file: (a file name)
                filename for saving pixel shift volume
                argument: ``--saveshift=%s``
        median_2dfilter: (a boolean)
                apply 2D median filtering
                argument: ``--median``
        save_unmasked_shift: (a boolean)
                saves the unmasked shiftmap when using --saveshift
                argument: ``--unmaskshift``
                mutually_exclusive: save_shift
        despike_2dfilter: (a boolean)
                apply a 2D de-spiking filter
                argument: ``--despike``
        save_unmasked_fmap: (a boolean)
                saves the unmasked fieldmap when using --savefmap
                argument: ``--unmaskfmap``
                mutually_exclusive: save_fmap
        in_file: (an existing file name)
                filename of input volume
                argument: ``--in=%s``
        warped_file: (a file name)
                apply forward warping and save as filename
                argument: ``--warp=%s``
                mutually_exclusive: unwarped_file
                requires: in_file
        dwell_to_asym_ratio: (a float)
                set the dwell to asym time ratio
                argument: ``--dwelltoasym=%.10f``
        unwarped_file: (a file name)
                apply unwarping and save as filename
                argument: ``--unwarp=%s``
                mutually_exclusive: warped_file
                requires: in_file
        icorr_only: (a boolean)
                apply intensity correction only
                argument: ``--icorronly``
                requires: unwarped_file
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        smooth2d: (a float)
                apply 2D Gaussian smoothing of sigma N (in mm)
                argument: ``--smooth2=%.2f``
        phase_conjugate: (a boolean)
                apply phase conjugate method of unwarping
                argument: ``--phaseconj``
        pava: (a boolean)
                apply monotonic enforcement via PAVA
                argument: ``--pava``
        save_fmap: (a boolean)
                write field map volume
                mutually_exclusive: save_unmasked_fmap
        output_type: (u'NIFTI_PAIR' or u'NIFTI_PAIR_GZ' or u'NIFTI_GZ' or
                  u'NIFTI')
                FSL output type
        icorr: (a boolean)
                apply intensity correction to unwarping (pixel shift method only)
                argument: ``--icorr``
                requires: shift_in_file
        fmap_in_file: (an existing file name)
                filename for loading fieldmap (rad/s)
                argument: ``--loadfmap=%s``
        despike_threshold: (a float)
                specify the threshold for de-spiking (default=3.0)
                argument: ``--despikethreshold=%s``
        unwarp_direction: (u'x' or u'y' or u'z' or u'x-' or u'y-' or u'z-')
                specifies direction of warping (default y)
                argument: ``--unwarpdir=%s``
        phasemap_in_file: (an existing file name)
                filename for input phase image
                argument: ``--phasemap=%s``
        fmap_out_file: (a file name)
                filename for saving fieldmap (rad/s)
                argument: ``--savefmap=%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
        mask_file: (an existing file name)
                filename for loading valid mask
                argument: ``--mask=%s``
        no_extend: (a boolean)
                do not apply rigid-body extrapolation to the fieldmap
                argument: ``--noextend``
        fourier_order: (an integer (int or long))
                apply Fourier (sinusoidal) fitting of order N
                argument: ``--fourier=%d``
        nokspace: (a boolean)
                do not use k-space forward warping
                argument: ``--nokspace``

Outputs::

        unwarped_file: (a file name)
                unwarped file
        shift_out_file: (a file name)
                voxel shift map file
        fmap_out_file: (a file name)
                fieldmap file
        warped_file: (a file name)
                forward warped file

References:
~~~~~~~~~~~
None

.. _nipype.interfaces.fsl.preprocess.MCFLIRT:


.. index:: MCFLIRT

MCFLIRT
-------

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

Wraps the executable command ``mcflirt``.

FSL MCFLIRT wrapper for within-modality motion correction

For complete details, see the `MCFLIRT Documentation.
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/MCFLIRT>`_

Examples
~~~~~~~~
>>> from nipype.interfaces import fsl
>>> mcflt = fsl.MCFLIRT()
>>> mcflt.inputs.in_file = 'functional.nii'
>>> mcflt.inputs.cost = 'mutualinfo'
>>> mcflt.inputs.out_file = 'moco.nii'
>>> mcflt.cmdline
'mcflirt -in functional.nii -cost mutualinfo -out moco.nii'
>>> res = mcflt.run()  # doctest: +SKIP

Inputs::

        [Mandatory]
        in_file: (an existing file name)
                timeseries to motion-correct
                argument: ``-in %s``, position: 0

        [Optional]
        use_gradient: (a boolean)
                run search on gradient images
                argument: ``-gdt``
        smooth: (a float)
                smoothing factor for the cost function
                argument: ``-smooth %.2f``
        cost: (u'mutualinfo' or u'woods' or u'corratio' or u'normcorr' or
                  u'normmi' or u'leastsquares')
                cost function to optimize
                argument: ``-cost %s``
        stats_imgs: (a boolean)
                produce variance and std. dev. images
                argument: ``-stats``
        save_mats: (a boolean)
                save transformation matrices
                argument: ``-mats``
        use_contour: (a boolean)
                run search on contour images
                argument: ``-edge``
        init: (an existing file name)
                inital transformation matrix
                argument: ``-init %s``
        ref_vol: (an integer (int or long))
                volume to align frames to
                argument: ``-refvol %d``
        interpolation: (u'spline' or u'nn' or u'sinc')
                interpolation method for transformation
                argument: ``-%s_final``
        save_rms: (a boolean)
                save rms displacement parameters
                argument: ``-rmsabs -rmsrel``
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        scaling: (a float)
                scaling factor to use
                argument: ``-scaling %.2f``
        rotation: (an integer (int or long))
                scaling factor for rotation tolerances
                argument: ``-rotation %d``
        mean_vol: (a boolean)
                register to mean volume
                argument: ``-meanvol``
        out_file: (a file name)
                file to write
                argument: ``-out %s``
        save_plots: (a boolean)
                save transformation parameters
                argument: ``-plots``
        dof: (an integer (int or long))
                degrees of freedom for the transformation
                argument: ``-dof %d``
        ref_file: (an existing file name)
                target image for motion correction
                argument: ``-reffile %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
        output_type: (u'NIFTI_PAIR' or u'NIFTI_PAIR_GZ' or u'NIFTI_GZ' or
                  u'NIFTI')
                FSL output type
        stages: (an integer (int or long))
                stages (if 4, perform final search with sinc interpolation
                argument: ``-stages %d``
        bins: (an integer (int or long))
                number of histogram bins
                argument: ``-bins %d``

Outputs::

        mean_img: (an existing file name)
                mean timeseries image (if mean_vol=True)
        std_img: (an existing file name)
                standard deviation image
        out_file: (an existing file name)
                motion-corrected timeseries
        variance_img: (an existing file name)
                variance image
        mat_file: (a list of items which are an existing file name)
                transformation matrices
        par_file: (an existing file name)
                text-file with motion parameters
        rms_files: (a list of items which are an existing file name)
                absolute and relative displacement parameters

References:
~~~~~~~~~~~
None

.. _nipype.interfaces.fsl.preprocess.PRELUDE:


.. index:: PRELUDE

PRELUDE
-------

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

Wraps the executable command ``prelude``.

FSL prelude wrapper for phase unwrapping

Examples
~~~~~~~~

Please insert examples for use of this command

Inputs::

        [Mandatory]
        phase_file: (an existing file name)
                raw phase file
                argument: ``--phase=%s``
                mutually_exclusive: complex_phase_file
        magnitude_file: (an existing file name)
                file containing magnitude image
                argument: ``--abs=%s``
                mutually_exclusive: complex_phase_file
        complex_phase_file: (an existing file name)
                complex phase input volume
                argument: ``--complex=%s``
                mutually_exclusive: magnitude_file, phase_file

        [Optional]
        end: (an integer (int or long))
                final image number to process (default Inf)
                argument: ``--end=%d``
        mask_file: (an existing file name)
                filename of mask input volume
                argument: ``--mask=%s``
        process3d: (a boolean)
                forces all processing to be full 3D
                argument: ``--force3D``
                mutually_exclusive: labelprocess2d, process2d
        process2d: (a boolean)
                does all processing in 2D (slice at a time)
                argument: ``--slices``
                mutually_exclusive: labelprocess2d
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        num_partitions: (an integer (int or long))
                number of phase partitions to use
                argument: ``--numphasesplit=%d``
        rawphase_file: (a file name)
                saving the raw phase output
                argument: ``--rawphase=%s``
        unwrapped_phase_file: (a file name)
                file containing unwrapepd phase
                argument: ``--unwrap=%s``
        threshold: (a float)
                intensity threshold for masking
                argument: ``--thresh=%.10f``
        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
        label_file: (a file name)
                saving the area labels output
                argument: ``--labels=%s``
        labelprocess2d: (a boolean)
                does label processing in 2D (slice at a time)
                argument: ``--labelslices``
        removeramps: (a boolean)
                remove phase ramps during unwrapping
                argument: ``--removeramps``
        savemask_file: (a file name)
                saving the mask volume
                argument: ``--savemask=%s``
        output_type: (u'NIFTI_PAIR' or u'NIFTI_PAIR_GZ' or u'NIFTI_GZ' or
                  u'NIFTI')
                FSL output type
        start: (an integer (int or long))
                first image number to process (default 0)
                argument: ``--start=%d``

Outputs::

        unwrapped_phase_file: (an existing file name)
                unwrapped phase file

References:
~~~~~~~~~~~
None

.. _nipype.interfaces.fsl.preprocess.SUSAN:


.. index:: SUSAN

SUSAN
-----

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

Wraps the executable command ``susan``.

FSL SUSAN wrapper to perform smoothing

For complete details, see the `SUSAN Documentation.
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/SUSAN>`_

Examples
~~~~~~~~

>>> from nipype.interfaces import fsl
>>> from nipype.testing import example_data
>>> anatfile  # doctest: +SKIP
anatomical.nii  # doctest: +SKIP
>>> sus = fsl.SUSAN()
>>> sus.inputs.in_file = example_data('structural.nii')
>>> sus.inputs.brightness_threshold = 2000.0
>>> sus.inputs.fwhm = 8.0
>>> result = sus.run()  # doctest: +SKIP

Inputs::

        [Mandatory]
        fwhm: (a float)
                fwhm of smoothing, in mm, gets converted using sqrt(8*log(2))
                argument: ``%.10f``, position: 3
        brightness_threshold: (a float)
                brightness threshold and should be greater than noise level and less
                than contrast of edges to be preserved.
                argument: ``%.10f``, position: 2
        in_file: (an existing file name)
                filename of input timeseries
                argument: ``%s``, position: 1

        [Optional]
        out_file: (a file name)
                output file name
                argument: ``%s``, position: -1
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%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
        output_type: (u'NIFTI_PAIR' or u'NIFTI_PAIR_GZ' or u'NIFTI_GZ' or
                  u'NIFTI')
                FSL output type
        use_median: (1 or 0, nipype default value: 1)
                whether to use a local median filter in the cases where single-point
                noise is detected
                argument: ``%d``, position: 5
        dimension: (3 or 2, nipype default value: 3)
                within-plane (2) or fully 3D (3)
                argument: ``%d``, position: 4
        usans: (a list of at most 2 items which are a tuple of the form: (an
                  existing file name, a float), nipype default value: [])
                determines whether the smoothing area (USAN) is to be found from
                secondary images (0, 1 or 2). A negative value for any brightness
                threshold will auto-set the threshold at 10% of the robust range

Outputs::

        smoothed_file: (an existing file name)
                smoothed output file

References:
~~~~~~~~~~~
None

.. _nipype.interfaces.fsl.preprocess.SliceTimer:


.. index:: SliceTimer

SliceTimer
----------

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

Wraps the executable command ``slicetimer``.

FSL slicetimer wrapper to perform slice timing correction

Examples
~~~~~~~~
>>> from nipype.interfaces import fsl
>>> from nipype.testing import example_data
>>> st = fsl.SliceTimer()
>>> st.inputs.in_file = example_data('functional.nii')
>>> st.inputs.interleaved = True
>>> result = st.run() #doctest: +SKIP

Inputs::

        [Mandatory]
        in_file: (an existing file name)
                filename of input timeseries
                argument: ``--in=%s``, position: 0

        [Optional]
        index_dir: (a boolean)
                slice indexing from top to bottom
                argument: ``--down``
        args: (a unicode string)
                Additional parameters to the command
                argument: ``%s``
        out_file: (a file name)
                filename of output timeseries
                argument: ``--out=%s``
        custom_timings: (an existing file name)
                slice timings, in fractions of TR, range 0:1 (default is 0.5 = no
                shift)
                argument: ``--tcustom=%s``
        time_repetition: (a float)
                Specify TR of data - default is 3s
                argument: ``--repeat=%f``
        slice_direction: (1 or 2 or 3)
                direction of slice acquisition (x=1, y=2, z=3) - default is z
                argument: ``--direction=%d``
        custom_order: (an existing file name)
                filename of single-column custom interleave order file (first slice
                is referred to as 1 not 0)
                argument: ``--ocustom=%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
        global_shift: (a float)
                shift in fraction of TR, range 0:1 (default is 0.5 = no shift)
                argument: ``--tglobal``
        output_type: (u'NIFTI_PAIR' or u'NIFTI_PAIR_GZ' or u'NIFTI_GZ' or
                  u'NIFTI')
                FSL output type
        interleaved: (a boolean)
                use interleaved acquisition
                argument: ``--odd``

Outputs::

        slice_time_corrected_file: (an existing file name)
                slice time corrected file

References:
~~~~~~~~~~~
None
