Home · Quickstart · User Guide and Examples · Interfaces Index · Developers · About · Nipy

# nipype.interfaces.fsl.epi module

The fsl module provides classes for interfacing with the FSL command line tools. This was written to work with FSL version 5.0.4.

## ApplyTOPUP

Link to code

> Bases: FSLCommand

> Wrapped executable: `applytopup`.

> Interface for FSL topup, a tool for estimating and correcting susceptibility induced distortions. General reference and use example.

> Examples

>     >>> from nipype.interfaces.fsl import ApplyTOPUP
>     >>> applytopup = ApplyTOPUP()
>     >>> applytopup.inputs.in_files = ["epi.nii", "epi_rev.nii"]
>     >>> applytopup.inputs.encoding_file = "topup_encoding.txt"
>     >>> applytopup.inputs.in_topup_fieldcoef = "topup_fieldcoef.nii.gz"
>     >>> applytopup.inputs.in_topup_movpar = "topup_movpar.txt"
>     >>> applytopup.inputs.output_type = "NIFTI_GZ"
>     >>> applytopup.cmdline
>     'applytopup --datain=topup_encoding.txt --imain=epi.nii,epi_rev.nii --inindex=1,2 --topup=topup --out=epi_corrected.nii.gz'
>     >>> res = applytopup.run()

> encoding_filea pathlike object or string representing an existing file

>   Name of text file with PE directions/times. Maps to a command-line argument: `--datain=%s`.

> in_filesa list of items which are a pathlike object or string representing an existing file

>   Name of file with images. Maps to a command-line argument: `--imain=%s`.

> argsa string

>   Additional parameters to the command. Maps to a command-line argument: `%s`.

> datatype‘char’ or ‘short’ or ‘int’ or ‘float’ or ‘double’

>   Force output data type. Maps to a command-line argument: `-d=%s`.

> environa 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’

>   Environment variables. (Nipype default value: `{}`)

> in_indexa list of items which are an integer

>   Comma separated list of indices corresponding to –datain. Maps to a command-line argument: `--inindex=%s`.

> in_topup_fieldcoefa pathlike object or string representing an existing file

>   Topup file containing the field coefficients. Maps to a command-line argument: `--topup=%s`. Requires inputs: `in_topup_movpar`.

> in_topup_movpara pathlike object or string representing an existing file

>   Topup movpar.txt file. Requires inputs: `in_topup_fieldcoef`.

> interp‘trilinear’ or ‘spline’

>   Interpolation method. Maps to a command-line argument: `--interp=%s`.

> method‘jac’ or ‘lsr’

>   Use jacobian modulation (jac) or least-squares resampling (lsr). Maps to a command-line argument: `--method=%s`.

> out_correcteda pathlike object or string representing a file

>   Output (warped) image. Maps to a command-line argument: `--out=%s`.

> output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’ or ‘GIFTI’

>   FSL output type.

> out_correcteda pathlike object or string representing an existing file

>   Name of 4D image file with unwarped images.

## EPIDeWarp

Link to code

> Bases: FSLCommand

> Wrapped executable: `epidewarp.fsl`.

> Wraps the unwarping script epidewarp.fsl.

> Warning

> deprecated in FSL, please use `niflow.nipype1.workflows.dmri.preprocess.epi.sdc_fmb()` instead.

> Examples

>     >>> from nipype.interfaces.fsl import EPIDeWarp
>     >>> dewarp = EPIDeWarp()
>     >>> dewarp.inputs.epi_file = "functional.nii"
>     >>> dewarp.inputs.mag_file = "magnitude.nii"
>     >>> dewarp.inputs.dph_file = "phase.nii"
>     >>> dewarp.inputs.output_type = "NIFTI_GZ"
>     >>> dewarp.cmdline
>     'epidewarp.fsl --mag magnitude.nii --dph phase.nii --epi functional.nii --esp 0.58 --exfdw .../exfdw.nii.gz --nocleanup --sigma 2 --tediff 2.46 --tmpdir .../temp --vsm .../vsm.nii.gz'
>     >>> res = dewarp.run()

> dph_filea pathlike object or string representing an existing file

>   Phase file assumed to be scaled from 0 to 4095. Maps to a command-line argument: `--dph %s`.

> mag_filea pathlike object or string representing an existing file

>   Magnitude file. Maps to a command-line argument: `--mag %s` (position: 0).

> argsa string

>   Additional parameters to the command. Maps to a command-line argument: `%s`.

> cleanupa boolean

>   Cleanup. Maps to a command-line argument: `--cleanup`.

> environa 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’

>   Environment variables. (Nipype default value: `{}`)

> epi_filea pathlike object or string representing an existing file

>   EPI volume to unwarp. Maps to a command-line argument: `--epi %s`.

> epidwa string

>   Dewarped epi volume. Maps to a command-line argument: `--epidw %s`.

> espa float

>   EPI echo spacing. Maps to a command-line argument: `--esp %s`. (Nipype default value: `0.58`)

> exf_filea pathlike object or string representing an existing file

>   Example func volume (or use epi). Maps to a command-line argument: `--exf %s`.

> exfdwa string

>   Dewarped example func volume. Maps to a command-line argument: `--exfdw %s`.

> nocleanupa boolean

>   No cleanup. Maps to a command-line argument: `--nocleanup`. (Nipype default value: `True`)

> output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’ or ‘GIFTI’

>   FSL output type.

> sigmaan integer

>   2D spatial gaussing smoothing stdev (default = 2mm). Maps to a command-line argument: `--sigma %s`. (Nipype default value: `2`)

> tediffa float

>   Difference in B0 field map TEs. Maps to a command-line argument: `--tediff %s`. (Nipype default value: `2.46`)

> tmpdira string

>   Tmpdir. Maps to a command-line argument: `--tmpdir %s`.

> vsma string

>   Voxel shift map. Maps to a command-line argument: `--vsm %s`.

> exf_maska pathlike object or string representing a file

>   Mask from example functional volume.

> exfdwa pathlike object or string representing a file

>   Dewarped functional volume example.

> unwarped_filea pathlike object or string representing a file

>   Unwarped epi file.

> vsm_filea pathlike object or string representing a file

>   Voxel shift map.

## Eddy

Link to code

> Bases: FSLCommand

> Wrapped executable: `eddy_openmp`.

> Interface for FSL eddy, a tool for estimating and correcting eddy currents induced distortions. User guide and more info regarding acqp file.

> Examples

>     >>> from nipype.interfaces.fsl import Eddy

> Running eddy on a CPU using OpenMP: >>> eddy = Eddy() >>> eddy.inputs.in_file = ‘epi.nii’ >>> eddy.inputs.in_mask = ‘epi_mask.nii’ >>> eddy.inputs.in_index = ‘epi_index.txt’ >>> eddy.inputs.in_acqp = ‘epi_acqp.txt’ >>> eddy.inputs.in_bvec = ‘bvecs.scheme’ >>> eddy.inputs.in_bval = ‘bvals.scheme’ >>> eddy.cmdline # doctest: +ELLIPSIS ‘eddy_openmp –flm=quadratic –ff=10.0 –acqp=epi_acqp.txt –bvals=bvals.scheme –bvecs=bvecs.scheme –imain=epi.nii –index=epi_index.txt –mask=epi_mask.nii –interp=spline –resamp=jac –niter=5 –nvoxhp=1000 –out=…/eddy_corrected –slm=none’

> Running eddy on an Nvidia GPU using cuda: >>> eddy.inputs.use_cuda = True >>> eddy.cmdline # doctest: +ELLIPSIS ‘eddy_cuda –flm=quadratic –ff=10.0 –acqp=epi_acqp.txt –bvals=bvals.scheme –bvecs=bvecs.scheme –imain=epi.nii –index=epi_index.txt –mask=epi_mask.nii –interp=spline –resamp=jac –niter=5 –nvoxhp=1000 –out=…/eddy_corrected –slm=none’

> Running eddy with slice-to-volume motion correction: >>> eddy.inputs.mporder = 6 >>> eddy.inputs.slice2vol_niter = 5 >>> eddy.inputs.slice2vol_lambda = 1 >>> eddy.inputs.slice2vol_interp = ‘trilinear’ >>> eddy.inputs.slice_order = ‘epi_slspec.txt’ >>> eddy.cmdline # doctest: +ELLIPSIS ‘eddy_cuda –flm=quadratic –ff=10.0 –acqp=epi_acqp.txt –bvals=bvals.scheme –bvecs=bvecs.scheme –imain=epi.nii –index=epi_index.txt –mask=epi_mask.nii –interp=spline –resamp=jac –mporder=6 –niter=5 –nvoxhp=1000 –out=…/eddy_corrected –s2v_interp=trilinear –s2v_lambda=1 –s2v_niter=5 –slspec=epi_slspec.txt –slm=none’ >>> res = eddy.run() # doctest: +SKIP

> in_acqpa pathlike object or string representing an existing file

>   File containing acquisition parameters. Maps to a command-line argument: `--acqp=%s`.

> in_bvala pathlike object or string representing an existing file

>   File containing the b-values for all volumes in –imain. Maps to a command-line argument: `--bvals=%s`.

> in_bveca pathlike object or string representing an existing file

>   File containing the b-vectors for all volumes in –imain. Maps to a command-line argument: `--bvecs=%s`.

> in_filea pathlike object or string representing an existing file

>   File containing all the images to estimate distortions for. Maps to a command-line argument: `--imain=%s`.

> in_indexa pathlike object or string representing an existing file

>   File containing indices for all volumes in –imain into –acqp and –topup. Maps to a command-line argument: `--index=%s`.

> in_maska pathlike object or string representing an existing file

>   Mask to indicate brain. Maps to a command-line argument: `--mask=%s`.

> argsa string

>   Additional parameters to the command. Maps to a command-line argument: `%s`.

> cnr_mapsa boolean

>   Output CNR-Maps. Maps to a command-line argument: `--cnr_maps`.

> dont_peasa boolean

>   Do NOT perform a post-eddy alignment of shells. Maps to a command-line argument: `--dont_peas`.

> dont_sep_offs_movea boolean

>   Do NOT attempt to separate field offset from subject movement. Maps to a command-line argument: `--dont_sep_offs_move`.

> environa 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’

>   Environment variables. (Nipype default value: `{}`)

> estimate_move_by_susceptibilitya boolean

>   Estimate how susceptibility field changes with subject movement. Maps to a command-line argument: `--estimate_move_by_susceptibility`.

> fepa boolean

>   Fill empty planes in x- or y-directions. Maps to a command-line argument: `--fep`.

> fielda pathlike object or string representing an existing file

>   Non-topup derived fieldmap scaled in Hz. Maps to a command-line argument: `--field=%s`.

> field_mata pathlike object or string representing an existing file

>   Matrix specifying the relative positions of the fieldmap, –field, and the first volume of the input file, –imain. Maps to a command-line argument: `--field_mat=%s`.

> flm‘quadratic’ or ‘linear’ or ‘cubic’

>   First level EC model. Maps to a command-line argument: `--flm=%s`. (Nipype default value: `quadratic`)

> fudge_factora float

>   Fudge factor for hyperparameter error variance. Maps to a command-line argument: `--ff=%s`. (Nipype default value: `10.0`)

> fwhma float

>   FWHM for conditioning filter when estimating the parameters. Maps to a command-line argument: `--fwhm=%s`.

> in_topup_fieldcoefa pathlike object or string representing an existing file

>   Topup results file containing the field coefficients. Maps to a command-line argument: `--topup=%s`. Requires inputs: `in_topup_movpar`.

> in_topup_movpara pathlike object or string representing an existing file

>   Topup results file containing the movement parameters (movpar.txt). Requires inputs: `in_topup_fieldcoef`.

> initranda boolean

>   Resets rand for when selecting voxels. Maps to a command-line argument: `--initrand`.

> interp‘spline’ or ‘trilinear’

>   Interpolation model for estimation step. Maps to a command-line argument: `--interp=%s`. (Nipype default value: `spline`)

> is_shelleda boolean

>   Override internal check to ensure that date are acquired on a set of b-value shells. Maps to a command-line argument: `--data_is_shelled`.

> jsona string or os.PathLike object referring to an existing file

>   Name of .json text file with information about slice timing. Maps to a command-line argument: `--json=%s`. Mutually exclusive with inputs: `slice_order`. Requires inputs: `mporder`.

> mbs_kspan integer

>   Knot-spacing for MBS field estimation. Maps to a command-line argument: `--mbs_ksp=%smm`. Requires inputs: `estimate_move_by_susceptibility`.

> mbs_lambdaan integer

>   Weighting of regularisation for MBS estimation. Maps to a command-line argument: `--mbs_lambda=%s`. Requires inputs: `estimate_move_by_susceptibility`.

> mbs_niteran integer

>   Number of iterations for MBS estimation. Maps to a command-line argument: `--mbs_niter=%s`. Requires inputs: `estimate_move_by_susceptibility`.

> method‘jac’ or ‘lsr’

>   Final resampling method (jacobian/least squares). Maps to a command-line argument: `--resamp=%s`. (Nipype default value: `jac`)

> mporderan integer

>   Order of slice-to-vol movement model. Maps to a command-line argument: `--mporder=%s`. Requires inputs: `use_cuda`.

> multiband_factoran integer

>   Multi-band factor. Maps to a command-line argument: `--mb=%s`.

> multiband_offset0 or 1 or -1

>   Multi-band offset (-1 if bottom slice removed, 1 if top slice removed. Maps to a command-line argument: `--mb_offs=%d`. Requires inputs: `multiband_factor`.

> niteran integer

>   Number of iterations. Maps to a command-line argument: `--niter=%s`. (Nipype default value: `5`)

> num_threadsan integer

>   Number of openmp threads to use. (Nipype default value: `1`)

> nvoxhpan integer

>   # of voxels used to estimate the hyperparameters. Maps to a command-line argument: `--nvoxhp=%s`. (Nipype default value: `1000`)

> out_basea string

>   Basename for output image. Maps to a command-line argument: `--out=%s`. (Nipype default value: `eddy_corrected`)

> outlier_nstdan integer

>   Number of std off to qualify as outlier. Maps to a command-line argument: `--ol_nstd`. Requires inputs: `repol`.

> outlier_nvoxan integer

>   Min # of voxels in a slice for inclusion in outlier detection. Maps to a command-line argument: `--ol_nvox`. Requires inputs: `repol`.

> outlier_posa boolean

>   Consider both positive and negative outliers if set. Maps to a command-line argument: `--ol_pos`. Requires inputs: `repol`.

> outlier_sqra boolean

>   Consider outliers among sums-of-squared differences if set. Maps to a command-line argument: `--ol_sqr`. Requires inputs: `repol`.

> outlier_type‘sw’ or ‘gw’ or ‘both’

>   Type of outliers, slicewise (sw), groupwise (gw) or both (both). Maps to a command-line argument: `--ol_type`. Requires inputs: `repol`.

> output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’ or ‘GIFTI’

>   FSL output type.

> repola boolean

>   Detect and replace outlier slices. Maps to a command-line argument: `--repol`.

> residualsa boolean

>   Output Residuals. Maps to a command-line argument: `--residuals`.

> sessiona pathlike object or string representing an existing file

>   File containing session indices for all volumes in –imain. Maps to a command-line argument: `--session=%s`.

> slice2vol_interp‘trilinear’ or ‘spline’

>   Slice-to-vol interpolation model for estimation step. Maps to a command-line argument: `--s2v_interp=%s`. Requires inputs: `mporder`.

> slice2vol_lambdaan integer

>   Regularisation weight for slice-to-vol movement (reasonable range 1-10). Maps to a command-line argument: `--s2v_lambda=%d`. Requires inputs: `mporder`.

> slice2vol_niteran integer

>   Number of iterations for slice-to-vol. Maps to a command-line argument: `--s2v_niter=%d`. Requires inputs: `mporder`.

> slice_ordera string or os.PathLike object referring to an existing file

>   Name of text file completely specifying slice/group acquisition. Maps to a command-line argument: `--slspec=%s`. Mutually exclusive with inputs: `json`. Requires inputs: `mporder`.

> slm‘none’ or ‘linear’ or ‘quadratic’

>   Second level EC model. Maps to a command-line argument: `--slm=%s`. (Nipype default value: `none`)

> use_cudaa boolean

>   Run eddy using cuda gpu.

> out_cnr_mapsa pathlike object or string representing an existing file

>   Path/name of file with the cnr_maps.

> out_correcteda pathlike object or string representing an existing file

>   4D image file containing all the corrected volumes.

> out_movement_over_timea pathlike object or string representing an existing file

>   Text file containing translations (mm) and rotations (radians) for each excitation.

> out_movement_rmsa pathlike object or string representing an existing file

>   Summary of the ‘total movement’ in each volume.

> out_outlier_freea pathlike object or string representing an existing file

>   4D image file not corrected for susceptibility or eddy-current distortions or subject movement but with outlier slices replaced.

> out_outlier_mapa pathlike object or string representing an existing file

>   Matrix where rows represent volumes and columns represent slices. “0” indicates that scan-slice is not an outlier and “1” indicates that it is.

> out_outlier_n_sqr_stdev_mapa pathlike object or string representing an existing file

>   Matrix where rows represent volumes and columns represent slices. Values indicate number of standard deivations off the square root of the mean squared difference between observation and prediction is.

> out_outlier_n_stdev_mapa pathlike object or string representing an existing file

>   Matrix where rows represent volumes and columns represent slices. Values indicate number of standard deviations off the mean difference between observation and prediction is.

> out_outlier_reporta pathlike object or string representing an existing file

>   Text file with a plain language report on what outlier slices eddy has found.

> out_parametera pathlike object or string representing an existing file

>   Text file with parameters defining the field and movement for each scan.

> out_residualsa pathlike object or string representing an existing file

>   Path/name of file with the residuals.

> out_restricted_movement_rmsa pathlike object or string representing an existing file

>   Summary of the ‘total movement’ in each volume disregarding translation in the PE direction.

> out_rotated_bvecsa pathlike object or string representing an existing file

>   File containing rotated b-values for all volumes.

> out_shell_alignment_parametersa pathlike object or string representing an existing file

>   Text file containing rigid body movement parameters between the different shells as estimated by a post-hoc mutual information based registration.

> out_shell_pe_translation_parametersa pathlike object or string representing an existing file

>   Text file containing translation along the PE-direction between the different shells as estimated by a post-hoc mutual information based registration.

## EddyCorrect

Link to code

> Bases: FSLCommand

> Wrapped executable: `eddy_correct`.

> Warning

> Deprecated in FSL. Please use `nipype.interfaces.fsl.epi.Eddy` instead

> Example

>     >>> from nipype.interfaces.fsl import EddyCorrect
>     >>> eddyc = EddyCorrect(in_file='diffusion.nii',
>     ...                     out_file="diffusion_edc.nii", ref_num=0)
>     >>> eddyc.cmdline
>     'eddy_correct diffusion.nii diffusion_edc.nii 0'

> in_filea pathlike object or string representing an existing file

>   4D input file. Maps to a command-line argument: `%s` (position: 0).

> ref_numan integer

>   Reference number. Maps to a command-line argument: `%d` (position: 2). (Nipype default value: `0`)

> argsa string

>   Additional parameters to the command. Maps to a command-line argument: `%s`.

> environa 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’

>   Environment variables. (Nipype default value: `{}`)

> out_filea pathlike object or string representing a file

>   4D output file. Maps to a command-line argument: `%s` (position: 1).

> output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’ or ‘GIFTI’

>   FSL output type.

> eddy_correcteda pathlike object or string representing an existing file

>   Path/name of 4D eddy corrected output file.

## EddyQuad

Link to code

> Bases: FSLCommand

> Wrapped executable: `eddy_quad`.

> Interface for FSL eddy_quad, a tool for generating single subject reports and storing the quality assessment indices for each subject. User guide

> Examples

>     >>> from nipype.interfaces.fsl import EddyQuad
>     >>> quad = EddyQuad()
>     >>> quad.inputs.base_name  = 'eddy_corrected'
>     >>> quad.inputs.idx_file   = 'epi_index.txt'
>     >>> quad.inputs.param_file = 'epi_acqp.txt'
>     >>> quad.inputs.mask_file  = 'epi_mask.nii'
>     >>> quad.inputs.bval_file  = 'bvals.scheme'
>     >>> quad.inputs.bvec_file  = 'bvecs.scheme'
>     >>> quad.inputs.output_dir = 'eddy_corrected.qc'
>     >>> quad.inputs.field      = 'fieldmap_phase_fslprepared.nii'
>     >>> quad.inputs.verbose    = True
>     >>> quad.cmdline
>     'eddy_quad eddy_corrected --bvals bvals.scheme --bvecs bvecs.scheme --field fieldmap_phase_fslprepared.nii --eddyIdx epi_index.txt --mask epi_mask.nii --output-dir eddy_corrected.qc --eddyParams epi_acqp.txt --verbose'
>     >>> res = quad.run()

> bval_filea pathlike object or string representing an existing file

>   B-values file. Maps to a command-line argument: `--bvals %s`.

> idx_filea pathlike object or string representing an existing file

>   File containing indices for all volumes into acquisition parameters. Maps to a command-line argument: `--eddyIdx %s`.

> mask_filea pathlike object or string representing an existing file

>   Binary mask file. Maps to a command-line argument: `--mask %s`.

> param_filea pathlike object or string representing an existing file

>   File containing acquisition parameters. Maps to a command-line argument: `--eddyParams %s`.

> argsa string

>   Additional parameters to the command. Maps to a command-line argument: `%s`.

> base_namea string

>   Basename (including path) for EDDY output files, i.e., corrected images and QC files. Maps to a command-line argument: `%s` (position: 0). (Nipype default value: `eddy_corrected`)

> bvec_filea pathlike object or string representing an existing file

>   B-vectors file - only used when <base_name>.eddy_residuals file is present. Maps to a command-line argument: `--bvecs %s`.

> environa 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’

>   Environment variables. (Nipype default value: `{}`)

> fielda pathlike object or string representing an existing file

>   TOPUP estimated field (in Hz). Maps to a command-line argument: `--field %s`.

> output_dira string

>   Output directory - default = ‘<base_name>.qc’. Maps to a command-line argument: `--output-dir %s`.

> output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’ or ‘GIFTI’

>   FSL output type.

> slice_speca pathlike object or string representing an existing file

>   Text file specifying slice/group acquisition. Maps to a command-line argument: `--slspec %s`.

> verbosea boolean

>   Display debug messages. Maps to a command-line argument: `--verbose`.

> avg_b0_pe_pnga list of items which are a pathlike object or string representing an existing file

>   Image showing mid-sagittal, -coronal and -axial slices of each averaged pe-direction b0 volume. Generated when using the -f option.

> avg_b_pnga list of items which are a pathlike object or string representing an existing file

>   Image showing mid-sagittal, -coronal and -axial slices of each averaged b-shell volume.

> clean_volumesa pathlike object or string representing an existing file

>   Text file containing a list of clean volumes, based on the eddy squared residuals. To generate a version of the pre-processed dataset without outlier volumes, use: fslselectvols -i <eddy_corrected_data> -o eddy_corrected_data_clean –vols=vols_no_outliers.txt.

> cnr_pnga list of items which are a pathlike object or string representing an existing file

>   Image showing mid-sagittal, -coronal and -axial slices of each b-shell CNR volume. Generated when CNR maps are available.

> qc_jsona pathlike object or string representing an existing file

>   Single subject database containing quality metrics and data info.

> qc_pdfa pathlike object or string representing an existing file

>   Single subject QC report.

> residualsa pathlike object or string representing an existing file

>   Text file containing the volume-wise mask-averaged squared residuals. Generated when residual maps are available.

> vdm_pnga pathlike object or string representing an existing file

>   Image showing mid-sagittal, -coronal and -axial slices of the voxel displacement map. Generated when using the -f option.

## EpiReg

Link to code

> Bases: FSLCommand

> Wrapped executable: `epi_reg`.

> Runs FSL epi_reg script for simultaneous coregistration and fieldmap unwarping.

> Examples

>     >>> from nipype.interfaces.fsl import EpiReg
>     >>> epireg = EpiReg()
>     >>> epireg.inputs.epi='epi.nii'
>     >>> epireg.inputs.t1_head='T1.nii'
>     >>> epireg.inputs.t1_brain='T1_brain.nii'
>     >>> epireg.inputs.out_base='epi2struct'
>     >>> epireg.inputs.fmap='fieldmap_phase_fslprepared.nii'
>     >>> epireg.inputs.fmapmag='fieldmap_mag.nii'
>     >>> epireg.inputs.fmapmagbrain='fieldmap_mag_brain.nii'
>     >>> epireg.inputs.echospacing=0.00067
>     >>> epireg.inputs.pedir='y'
>     >>> epireg.cmdline
>     'epi_reg --echospacing=0.000670 --fmap=fieldmap_phase_fslprepared.nii --fmapmag=fieldmap_mag.nii --fmapmagbrain=fieldmap_mag_brain.nii --noclean --pedir=y --epi=epi.nii --t1=T1.nii --t1brain=T1_brain.nii --out=epi2struct'
>     >>> epireg.run()

> epia pathlike object or string representing an existing file

>   EPI image. Maps to a command-line argument: `--epi=%s` (position: -4).

> t1_braina pathlike object or string representing an existing file

>   Brain extracted T1 image. Maps to a command-line argument: `--t1brain=%s` (position: -2).

> t1_heada pathlike object or string representing an existing file

>   Wholehead T1 image. Maps to a command-line argument: `--t1=%s` (position: -3).

> argsa string

>   Additional parameters to the command. Maps to a command-line argument: `%s`.

> echospacinga float

>   Effective EPI echo spacing (sometimes called dwell time) - in seconds. Maps to a command-line argument: `--echospacing=%f`.

> environa 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’

>   Environment variables. (Nipype default value: `{}`)

> fmapa pathlike object or string representing an existing file

>   Fieldmap image (in rad/s). Maps to a command-line argument: `--fmap=%s`.

> fmapmaga pathlike object or string representing an existing file

>   Fieldmap magnitude image - wholehead. Maps to a command-line argument: `--fmapmag=%s`.

> fmapmagbraina pathlike object or string representing an existing file

>   Fieldmap magnitude image - brain extracted. Maps to a command-line argument: `--fmapmagbrain=%s`.

> no_cleana boolean

>   Do not clean up intermediate files. Maps to a command-line argument: `--noclean`. (Nipype default value: `True`)

> no_fmaprega boolean

>   Do not perform registration of fmap to T1 (use if fmap already registered). Maps to a command-line argument: `--nofmapreg`.

> out_basea string

>   Output base name. Maps to a command-line argument: `--out=%s` (position: -1). (Nipype default value: `epi2struct`)

> output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’ or ‘GIFTI’

>   FSL output type.

> pedir‘x’ or ‘y’ or ‘z’ or ‘-x’ or ‘-y’ or ‘-z’

>   Phase encoding direction, dir = x/y/z/-x/-y/-z. Maps to a command-line argument: `--pedir=%s`.

> weight_imagea pathlike object or string representing an existing file

>   Weighting image (in T1 space). Maps to a command-line argument: `--weight=%s`.

> wmsega pathlike object or string representing an existing file

>   White matter segmentation of T1 image, has to be named like the t1brain and end on _wmseg. Maps to a command-line argument: `--wmseg=%s`.

> epi2str_inva pathlike object or string representing an existing file

>   Rigid structural-to-epi transform.

> epi2str_mata pathlike object or string representing an existing file

>   Rigid epi-to-structural transform.

> fmap2epi_mata pathlike object or string representing an existing file

>   Rigid fieldmap-to-epi transform.

> fmap2str_mata pathlike object or string representing an existing file

>   Rigid fieldmap-to-structural transform.

> fmap_epia pathlike object or string representing an existing file

>   Fieldmap in epi space.

> fmap_stra pathlike object or string representing an existing file

>   Fieldmap in structural space.

> fmapmag_stra pathlike object or string representing an existing file

>   Fieldmap magnitude image in structural space.

> fullwarpa pathlike object or string representing an existing file

>   Warpfield to unwarp epi and transform into structural space.

> out_1vola pathlike object or string representing an existing file

>   Unwarped and coregistered single volume.

> out_filea pathlike object or string representing an existing file

>   Unwarped and coregistered epi input.

> sega pathlike object or string representing an existing file

>   White matter, gray matter, csf segmentation.

> shiftmapa pathlike object or string representing an existing file

>   Shiftmap in epi space.

> wmedgea pathlike object or string representing an existing file

>   White matter edges for visualization.

> wmsega pathlike object or string representing an existing file

>   White matter segmentation used in flirt bbr.

## PrepareFieldmap

Link to code

> Bases: FSLCommand

> Wrapped executable: `fsl_prepare_fieldmap`.

> Interface for the fsl_prepare_fieldmap script (FSL 5.0)

> Prepares a fieldmap suitable for FEAT from SIEMENS data - saves output in rad/s format (e.g. ``fsl_prepare_fieldmap SIEMENS images_3_gre_field_mapping images_4_gre_field_mapping fmap_rads 2.65``).

> Examples

>     >>> from nipype.interfaces.fsl import PrepareFieldmap
>     >>> prepare = PrepareFieldmap()
>     >>> prepare.inputs.in_phase = "phase.nii"
>     >>> prepare.inputs.in_magnitude = "magnitude.nii"
>     >>> prepare.inputs.output_type = "NIFTI_GZ"
>     >>> prepare.cmdline
>     'fsl_prepare_fieldmap SIEMENS phase.nii magnitude.nii .../phase_fslprepared.nii.gz 2.460000'
>     >>> res = prepare.run()

> delta_TEa float

>   Echo time difference of the fieldmap sequence in ms. (usually 2.46ms in Siemens). Maps to a command-line argument: `%f` (position: -2). (Nipype default value: `2.46`)

> in_magnitudea pathlike object or string representing an existing file

>   Magnitude difference map, brain extracted. Maps to a command-line argument: `%s` (position: 3).

> in_phasea pathlike object or string representing an existing file

>   Phase difference map, in SIEMENS format range from 0-4096 or 0-8192). Maps to a command-line argument: `%s` (position: 2).

> argsa string

>   Additional parameters to the command. Maps to a command-line argument: `%s`.

> environa 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’

>   Environment variables. (Nipype default value: `{}`)

> nochecka boolean

>   Do not perform sanity checks for image size/range/dimensions. Maps to a command-line argument: `--nocheck` (position: -1). (Nipype default value: `False`)

> out_fieldmapa pathlike object or string representing a file

>   Output name for prepared fieldmap. Maps to a command-line argument: `%s` (position: 4).

> output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’ or ‘GIFTI’

>   FSL output type.

> scannera string

>   Must be SIEMENS. Maps to a command-line argument: `%s` (position: 1). (Nipype default value: `SIEMENS`)

> out_fieldmapa pathlike object or string representing an existing file

>   Output name for prepared fieldmap.

## SigLoss

Link to code

> Bases: FSLCommand

> Wrapped executable: `sigloss`.

> Estimates signal loss from a field map (in rad/s)

> Examples

>     >>> from nipype.interfaces.fsl import SigLoss
>     >>> sigloss = SigLoss()
>     >>> sigloss.inputs.in_file = "phase.nii"
>     >>> sigloss.inputs.echo_time = 0.03
>     >>> sigloss.inputs.output_type = "NIFTI_GZ"
>     >>> sigloss.cmdline
>     'sigloss --te=0.030000 -i phase.nii -s .../phase_sigloss.nii.gz'
>     >>> res = sigloss.run()

> in_filea pathlike object or string representing an existing file

>   B0 fieldmap file. Maps to a command-line argument: `-i %s`.

> argsa string

>   Additional parameters to the command. Maps to a command-line argument: `%s`.

> echo_timea float

>   Echo time in seconds. Maps to a command-line argument: `--te=%f`.

> environa 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’

>   Environment variables. (Nipype default value: `{}`)

> mask_filea pathlike object or string representing an existing file

>   Brain mask file. Maps to a command-line argument: `-m %s`.

> out_filea pathlike object or string representing a file

>   Output signal loss estimate file. Maps to a command-line argument: `-s %s`.

> output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’ or ‘GIFTI’

>   FSL output type.

> slice_direction‘x’ or ‘y’ or ‘z’

>   Slicing direction. Maps to a command-line argument: `-d %s`.

> out_filea pathlike object or string representing an existing file

>   Signal loss estimate file.

## TOPUP

Link to code

> Bases: FSLCommand

> Wrapped executable: `topup`.

> Interface for FSL topup, a tool for estimating and correcting susceptibility induced distortions. See FSL documentation for reference, usage examples, and exemplary config files.

> Examples

>     >>> from nipype.interfaces.fsl import TOPUP
>     >>> topup = TOPUP()
>     >>> topup.inputs.in_file = "b0_b0rev.nii"
>     >>> topup.inputs.encoding_file = "topup_encoding.txt"
>     >>> topup.inputs.output_type = "NIFTI_GZ"
>     >>> topup.cmdline
>     'topup --config=b02b0.cnf --datain=topup_encoding.txt --imain=b0_b0rev.nii --out=b0_b0rev_base --iout=b0_b0rev_corrected.nii.gz --fout=b0_b0rev_field.nii.gz --jacout=jac --logout=b0_b0rev_topup.log --rbmout=xfm --dfout=warpfield'
>     >>> res = topup.run()

> encoding_directiona list of items which are ‘y’ or ‘x’ or ‘z’ or ‘x-’ or ‘y-’ or ‘z-’

>   Encoding direction for automatic generation of encoding_file. Maps to a command-line argument: `--datain=%s`. Mutually exclusive with inputs: `encoding_file`. Requires inputs: `readout_times`.

> encoding_filea pathlike object or string representing an existing file

>   Name of text file with PE directions/times. Maps to a command-line argument: `--datain=%s`. Mutually exclusive with inputs: `encoding_direction`.

> in_filea pathlike object or string representing an existing file

>   Name of 4D file with images. Maps to a command-line argument: `--imain=%s`.

> readout_timesa list of items which are a float

>   Readout times (dwell times by # phase-encode steps minus 1). Mutually exclusive with inputs: `encoding_file`. Requires inputs: `encoding_direction`.

> argsa string

>   Additional parameters to the command. Maps to a command-line argument: `%s`.

> configa string

>   Name of config file specifying command line arguments. Maps to a command-line argument: `--config=%s`. (Nipype default value: `b02b0.cnf`)

> environa 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’

>   Environment variables. (Nipype default value: `{}`)

> estmov1 or 0

>   Estimate movements if set. Maps to a command-line argument: `--estmov=%d`.

> fwhma float

>   FWHM (in mm) of gaussian smoothing kernel. Maps to a command-line argument: `--fwhm=%f`.

> interp‘spline’ or ‘linear’

>   Image interpolation model, linear or spline. Maps to a command-line argument: `--interp=%s`.

> max_iteran integer

>   Max # of non-linear iterations. Maps to a command-line argument: `--miter=%d`.

> minmet0 or 1

>   Minimisation method 0=Levenberg-Marquardt, 1=Scaled Conjugate Gradient. Maps to a command-line argument: `--minmet=%d`.

> numprec‘double’ or ‘float’

>   Precision for representing Hessian, double or float. Maps to a command-line argument: `--numprec=%s`.

> out_basea pathlike object or string representing a file

>   Base-name of output files (spline coefficients (Hz) and movement parameters). Maps to a command-line argument: `--out=%s`.

> out_correcteda pathlike object or string representing a file

>   Name of 4D image file with unwarped images. Maps to a command-line argument: `--iout=%s`.

> out_fielda pathlike object or string representing a file

>   Name of image file with field (Hz). Maps to a command-line argument: `--fout=%s`.

> out_jac_prefixa string

>   Prefix for the warpfield images. Maps to a command-line argument: `--jacout=%s`. (Nipype default value: `jac`)

> out_logfilea pathlike object or string representing a file

>   Name of log-file. Maps to a command-line argument: `--logout=%s`.

> out_mat_prefixa string

>   Prefix for the realignment matrices. Maps to a command-line argument: `--rbmout=%s`. (Nipype default value: `xfm`)

> out_warp_prefixa string

>   Prefix for the warpfield images (in mm). Maps to a command-line argument: `--dfout=%s`. (Nipype default value: `warpfield`)

> output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’ or ‘GIFTI’

>   FSL output type.

> reg_lambdaa float

>   Weight of regularisation, default depending on –ssqlambda and –regmod switches. Maps to a command-line argument: `--lambda=%0.f`.

> regmod‘bending_energy’ or ‘membrane_energy’

>   Regularisation term implementation. Defaults to bending_energy. Note that the two functions have vastly different scales. The membrane energy is based on the first derivatives and the bending energy on the second derivatives. The second derivatives will typically be much smaller than the first derivatives, so input lambda will have to be larger for bending_energy to yield approximately the same level of regularisation. Maps to a command-line argument: `--regmod=%s`.

> regrid1 or 0

>   If set (=1), the calculations are done in a different grid. Maps to a command-line argument: `--regrid=%d`.

> scale0 or 1

>   If set (=1), the images are individually scaled to a common mean. Maps to a command-line argument: `--scale=%d`.

> splineorderan integer

>   Order of spline, 2->Qadratic spline, 3->Cubic spline. Maps to a command-line argument: `--splineorder=%d`.

> ssqlambda1 or 0

>   Weight lambda by the current value of the ssd. If used (=1), the effective weight of regularisation term becomes higher for the initial iterations, therefore initial steps are a little smoother than they would without weighting. This reduces the risk of finding a local minimum. Maps to a command-line argument: `--ssqlambda=%d`.

> subsampan integer

>   Sub-sampling scheme. Maps to a command-line argument: `--subsamp=%d`.

> warp_resa float

>   (approximate) resolution (in mm) of warp basis for the different sub-sampling levels. Maps to a command-line argument: `--warpres=%f`.

> out_correcteda pathlike object or string representing a file

>   Name of 4D image file with unwarped images.

> out_enc_filea pathlike object or string representing a file

>   Encoding directions file output for applytopup.

> out_fielda pathlike object or string representing a file

>   Name of image file with field (Hz).

> out_fieldcoefa pathlike object or string representing an existing file

>   File containing the field coefficients.

> out_jacsa list of items which are a pathlike object or string representing an existing file

>   Jacobian images.

> out_logfilea pathlike object or string representing a file

>   Name of log-file.

> out_matsa list of items which are a pathlike object or string representing an existing file

>   Realignment matrices.

> out_movpara pathlike object or string representing an existing file

>   Movpar.txt output file.

> out_warpsa list of items which are a pathlike object or string representing an existing file

>   Warpfield images.