interfaces.fsl.preprocess

ApplyWarp

Link to code

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' 
>>> res = aw.run() 

Inputs:

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

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

References:

None

ApplyXFM

Link to code

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() 

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

References:

None

BET

Link to code

Wraps the executable command bet.

FSL BET wrapper for skull stripping

For complete details, see the BET Documentation.

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() 

Inputs:

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

[Optional]
out_file: (a file name)
        name of output skull stripped image
        argument: ``%s``, position: 1
outline: (a boolean)
        create surface outline image
        argument: ``-o``
mask: (a boolean)
        create binary mask image
        argument: ``-m``
skull: (a boolean)
        create skull image
        argument: ``-s``
no_output: (a boolean)
        Don't generate segmented output
        argument: ``-n``
frac: (a float)
        fractional intensity threshold
        argument: ``-f %.2f``
vertical_gradient: (a float)
        vertical gradient in fractional intensity threshold (-1, 1)
        argument: ``-g %.2f``
radius: (an integer (int or long))
        head radius
        argument: ``-r %d``
center: (a list of at most 3 items which are an integer (int or
          long))
        center of gravity in voxels
        argument: ``-c %s``
threshold: (a boolean)
        apply thresholding to segmented brain image and mask
        argument: ``-t``
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
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
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
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
functional: (a boolean)
        apply to 4D fMRI data
        argument: ``-F``
        mutually_exclusive: functional, reduce_bias, robust, padding,
          remove_eyes, surfaces, t2_guided
reduce_bias: (a boolean)
        bias field and neck cleanup
        argument: ``-B``
        mutually_exclusive: functional, reduce_bias, robust, padding,
          remove_eyes, surfaces, t2_guided
output_type: ('NIFTI' or 'NIFTI_PAIR' or 'NIFTI_GZ' or
          'NIFTI_PAIR_GZ')
        FSL output type
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 file name)
        path/name of skullstripped file (if generated)
mask_file: (a file name)
        path/name of binary brain mask (if generated)
outline_file: (a file name)
        path/name of outline file (if generated)
meshfile: (a file name)
        path/name of vtk mesh file (if generated)
inskull_mask_file: (a file name)
        path/name of inskull mask (if generated)
inskull_mesh_file: (a file name)
        path/name of inskull mesh outline (if generated)
outskull_mask_file: (a file name)
        path/name of outskull mask (if generated)
outskull_mesh_file: (a file name)
        path/name of outskull mesh outline (if generated)
outskin_mask_file: (a file name)
        path/name of outskin mask (if generated)
outskin_mesh_file: (a file name)
        path/name of outskin mesh outline (if generated)
skull_mask_file: (a file name)
        path/name of skull mask (if generated)

References:

None

FAST

Link to code

Wraps the executable command fast.

FSL FAST wrapper for segmentation and bias correction

For complete details, see the FAST Documentation.

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()  

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

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

References:

None

FIRST

Link to code

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() 

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]
verbose: (a boolean)
        Use verbose logging.
        argument: ``-v``, position: 1
brain_extracted: (a boolean)
        Input structural image is already brain-extracted
        argument: ``-b``, position: 2
no_cleanup: (a boolean)
        Input structural image is already brain-extracted
        argument: ``-d``, position: 3
method: ('auto' or 'fast' or '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
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
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
affine_file: (an existing file name)
        Affine matrix to use (e.g. img2std.mat) (does not re-run
        registration)
        argument: ``-a %s``, position: 6
output_type: ('NIFTI' or 'NIFTI_PAIR' or 'NIFTI_GZ' or
          'NIFTI_PAIR_GZ')
        FSL output type
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:

vtk_surfaces: (a list of items which are an existing file name)
        VTK format meshes for each subcortical 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
segmentation_file: (an existing file name)
        4D image file containing a single volume per segmented region

References:

None

FLIRT

Link to code

Wraps the executable command flirt.

FSL FLIRT wrapper for coregistration

For complete details, see the FLIRT Documentation.

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 
'flirt -in structural.nii -ref mni.nii -out structural_flirt.nii.gz -omat structural_flirt.mat -bins 640 -searchcost mutualinfo'
>>> res = flt.run() 

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

References:

None

FNIRT

Link to code

Wraps the executable command fnirt.

FSL FNIRT wrapper for non-linear registration

For complete details, see the FNIRT Documentation.

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')) 

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')

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

>>> fnirt_mprage.cmdline  
'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]
affine_file: (an existing file name)
        name of file containing affine transform
        argument: ``--aff=%s``
inwarp_file: (an existing file name)
        name of file containing initial non-linear warps
        argument: ``--inwarp=%s``
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``
fieldcoeff_file: (a boolean or a file name)
        name of output file with field coefficients or true
        argument: ``--cout=%s``
warped_file: (a file name)
        name of output image
        argument: ``--iout=%s``
field_file: (a boolean or a file name)
        name of output file with field or true
        argument: ``--fout=%s``
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``
modulatedref_file: (a boolean or a file name)
        name of file for writing out intensity modulated --ref (for
        diagnostic purposes)
        argument: ``--refout=%s``
out_intensitymap_file: (a boolean or a file name)
        name of files for writing information pertaining to intensity
        mapping
        argument: ``--intout=%s``
log_file: (a file name)
        Name of log-file
        argument: ``--logout=%s``
config_file: ('T1_2_MNI152_2mm' or 'FA_2_FMRIB58_1mm' or an existing
          file name)
        Name of config file specifying command line arguments
        argument: ``--config=%s``
refmask_file: (an existing file name)
        name of file with mask in reference space
        argument: ``--refmask=%s``
inmask_file: (an existing file name)
        name of file with mask in input image space
        argument: ``--inmask=%s``
skip_refmask: (a boolean)
        Skip specified refmask if set, default false
        argument: ``--applyrefmask=0``
        mutually_exclusive: apply_refmask
skip_inmask: (a boolean)
        skip specified inmask if set, default false
        argument: ``--applyinmask=0``
        mutually_exclusive: apply_inmask
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
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
skip_implicit_ref_masking: (a boolean)
        skip implicit masking based on value in --ref image. Default = 0
        argument: ``--imprefm=0``
skip_implicit_in_masking: (a boolean)
        skip implicit masking based on value in --in image. Default = 0
        argument: ``--impinm=0``
refmask_val: (a float)
        Value to mask out in --ref image. Default =0.0
        argument: ``--imprefval=%f``
inmask_val: (a float)
        Value to mask out in --in image. Default =0.0
        argument: ``--impinval=%f``
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``
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``
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``
spline_order: (an integer (int or long))
        Order of spline, 2->Qadratic spline, 3->Cubic spline. Default=3
        argument: ``--splineorder=%d``
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``
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``
regularization_model: ('membrane_energy' or 'bending_energy')
        Model for regularisation of warp-field [membrane_energy
        bending_energy], default bending_energy
        argument: ``--regmod=%s``
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``
skip_lambda_ssq: (a boolean)
        If true, lambda is not weighted by current ssq, default false
        argument: ``--ssqlambda=0``
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``
derive_from_ref: (a boolean)
        If true, ref image is used to calculate derivatives. Default false
        argument: ``--refderiv``
intensity_mapping_model: ('none' or 'global_linear' or
          'global_non_linear' or 'local_linear' or
          'global_non_linear_with_bias' or 'local_non_linear')
        Model for intensity-mapping
        argument: ``--intmod=%s``
intensity_mapping_order: (an integer (int or long))
        Order of poynomial for mapping intensities, default 5
        argument: ``--intorder=%d``
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``
bias_regularization_lambda: (a float)
        Weight of regularisation for bias-field, default 10000
        argument: ``--biaslambda=%f``
skip_intensity_mapping: (a boolean)
        Skip estimate intensity-mapping default false
        argument: ``--estint=0``
        mutually_exclusive: apply_intensity_mapping
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
hessian_precision: ('double' or 'float')
        Precision for representing Hessian, double or float. Default double
        argument: ``--numprec=%s``
output_type: ('NIFTI' or 'NIFTI_PAIR' or 'NIFTI_GZ' or
          'NIFTI_PAIR_GZ')
        FSL output type
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:

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

References:

None

FUGUE

Link to code

Wraps the executable command fugue.

FSL FUGUE set of tools for EPI distortion correction

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 
'fugue --in=epi.nii --mask=epi_mask.nii --loadshift=vsm.nii --unwarpdir=y --unwarp=epi_unwarped.nii.gz'
>>> fugue.run() 

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 
'fugue --in=epi.nii --mask=epi_mask.nii --loadshift=vsm.nii --unwarpdir=y --warp=epi_warped.nii.gz'
>>> fugue.run() 

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 
'fugue --dwelltoasym=0.9390243902 --mask=epi_mask.nii --phasemap=epi_phasediff.nii --saveshift=epi_phasediff_vsm.nii.gz --unwarpdir=y'
>>> fugue.run() 

Inputs:

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

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

References:

None

MCFLIRT

Link to code

Wraps the executable command mcflirt.

FSL MCFLIRT wrapper for within-modality motion correction

For complete details, see the MCFLIRT Documentation.

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()  

Inputs:

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

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

References:

None

PRELUDE

Link to code

Wraps the executable command prelude.

FSL prelude wrapper for phase unwrapping

Examples

Please insert examples for use of this command

Inputs:

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

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

unwrapped_phase_file: (an existing file name)
        unwrapped phase file

References:

None

SUSAN

Link to code

Wraps the executable command susan.

FSL SUSAN wrapper to perform smoothing

For complete details, see the SUSAN Documentation.

Examples

>>> from nipype.interfaces import fsl
>>> from nipype.testing import example_data
>>> anatfile  
anatomical.nii  
>>> 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()  

Inputs:

[Mandatory]
in_file: (an existing file name)
        filename of input timeseries
        argument: ``%s``, position: 1
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
fwhm: (a float)
        fwhm of smoothing, in mm, gets converted using sqrt(8*log(2))
        argument: ``%.10f``, position: 3

[Optional]
dimension: (3 or 2, nipype default value: 3)
        within-plane (2) or fully 3D (3)
        argument: ``%d``, position: 4
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
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
out_file: (a file name)
        output file name
        argument: ``%s``, position: -1
output_type: ('NIFTI' or 'NIFTI_PAIR' or 'NIFTI_GZ' or
          'NIFTI_PAIR_GZ')
        FSL output type
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:

smoothed_file: (an existing file name)
        smoothed output file

References:

None

SliceTimer

Link to code

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() 

Inputs:

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

[Optional]
out_file: (a file name)
        filename of output timeseries
        argument: ``--out=%s``
index_dir: (a boolean)
        slice indexing from top to bottom
        argument: ``--down``
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``
interleaved: (a boolean)
        use interleaved acquisition
        argument: ``--odd``
custom_timings: (an existing file name)
        slice timings, in fractions of TR, range 0:1 (default is 0.5 = no
        shift)
        argument: ``--tcustom=%s``
global_shift: (a float)
        shift in fraction of TR, range 0:1 (default is 0.5 = no shift)
        argument: ``--tglobal``
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``
output_type: ('NIFTI' or 'NIFTI_PAIR' or 'NIFTI_GZ' or
          'NIFTI_PAIR_GZ')
        FSL output type
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:

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

References:

None