interfaces.fsl.epi¶
ApplyTOPUP¶
Wraps the executable command 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 # doctest: +ELLIPSIS
'applytopup --datain=topup_encoding.txt --imain=epi.nii,epi_rev.nii --inindex=1,2 --topup=topup --out=epi_corrected.nii.gz'
>>> res = applytopup.run() # doctest: +SKIP
Inputs:
[Mandatory]
in_files: (a list of items which are a pathlike object or string
representing an existing file)
name of file with images
argument: ``--imain=%s``
encoding_file: (a pathlike object or string representing an existing
file)
name of text file with PE directions/times
argument: ``--datain=%s``
[Optional]
in_index: (a list of items which are an integer (int or long))
comma separated list of indices corresponding to --datain
argument: ``--inindex=%s``
in_topup_fieldcoef: (a pathlike object or string representing an
existing file)
topup file containing the field coefficients
argument: ``--topup=%s``
requires: in_topup_movpar
in_topup_movpar: (a pathlike object or string representing an
existing file)
topup movpar.txt file
requires: in_topup_fieldcoef
out_corrected: (a pathlike object or string representing a file)
output (warped) image
argument: ``--out=%s``
method: ('jac' or 'lsr')
use jacobian modulation (jac) or least-squares resampling (lsr)
argument: ``--method=%s``
interp: ('trilinear' or 'spline')
interpolation method
argument: ``--interp=%s``
datatype: ('char' or 'short' or 'int' or 'float' or 'double')
force output data type
argument: ``-d=%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_corrected: (a pathlike object or string representing an existing
file)
name of 4D image file with unwarped images
References:¶
None
EPIDeWarp¶
Wraps the executable command 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 # doctest: +ELLIPSIS
'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() # doctest: +SKIP
Inputs:
[Mandatory]
mag_file: (a pathlike object or string representing an existing file)
Magnitude file
argument: ``--mag %s``, position: 0
dph_file: (a pathlike object or string representing an existing file)
Phase file assumed to be scaled from 0 to 4095
argument: ``--dph %s``
[Optional]
exf_file: (a pathlike object or string representing an existing file)
example func volume (or use epi)
argument: ``--exf %s``
epi_file: (a pathlike object or string representing an existing file)
EPI volume to unwarp
argument: ``--epi %s``
tediff: (a float, nipype default value: 2.46)
difference in B0 field map TEs
argument: ``--tediff %s``
esp: (a float, nipype default value: 0.58)
EPI echo spacing
argument: ``--esp %s``
sigma: (an integer (int or long), nipype default value: 2)
2D spatial gaussing smoothing stdev (default = 2mm)
argument: ``--sigma %s``
vsm: (a string)
voxel shift map
argument: ``--vsm %s``
exfdw: (a string)
dewarped example func volume
argument: ``--exfdw %s``
epidw: (a string)
dewarped epi volume
argument: ``--epidw %s``
tmpdir: (a string)
tmpdir
argument: ``--tmpdir %s``
nocleanup: (a boolean, nipype default value: True)
no cleanup
argument: ``--nocleanup``
cleanup: (a boolean)
cleanup
argument: ``--cleanup``
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 pathlike object or string representing a file)
unwarped epi file
vsm_file: (a pathlike object or string representing a file)
voxel shift map
exfdw: (a pathlike object or string representing a file)
dewarped functional volume example
exf_mask: (a pathlike object or string representing a file)
Mask from example functional volume
References:¶
None
Eddy¶
Wraps the executable command 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
>>> 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.inputs.use_cuda = True
>>> eddy.cmdline # doctest: +ELLIPSIS
'eddy_cuda --ff=10.0 --acqp=epi_acqp.txt --bvals=bvals.scheme --bvecs=bvecs.scheme --imain=epi.nii --index=epi_index.txt --mask=epi_mask.nii --niter=5 --nvoxhp=1000 --out=.../eddy_corrected'
>>> eddy.inputs.use_cuda = False
>>> eddy.cmdline # doctest: +ELLIPSIS
'eddy_openmp --ff=10.0 --acqp=epi_acqp.txt --bvals=bvals.scheme --bvecs=bvecs.scheme --imain=epi.nii --index=epi_index.txt --mask=epi_mask.nii --niter=5 --nvoxhp=1000 --out=.../eddy_corrected'
>>> res = eddy.run() # doctest: +SKIP
Inputs:
[Mandatory]
in_file: (a pathlike object or string representing an existing file)
File containing all the images to estimate distortions for
argument: ``--imain=%s``
in_mask: (a pathlike object or string representing an existing file)
Mask to indicate brain
argument: ``--mask=%s``
in_index: (a pathlike object or string representing an existing file)
File containing indices for all volumes in --imain into --acqp and
--topup
argument: ``--index=%s``
in_acqp: (a pathlike object or string representing an existing file)
File containing acquisition parameters
argument: ``--acqp=%s``
in_bvec: (a pathlike object or string representing an existing file)
File containing the b-vectors for all volumes in --imain
argument: ``--bvecs=%s``
in_bval: (a pathlike object or string representing an existing file)
File containing the b-values for all volumes in --imain
argument: ``--bvals=%s``
[Optional]
out_base: (a unicode string, nipype default value: eddy_corrected)
basename for output (warped) image
argument: ``--out=%s``
session: (a pathlike object or string representing an existing file)
File containing session indices for all volumes in --imain
argument: ``--session=%s``
in_topup_fieldcoef: (a pathlike object or string representing an
existing file)
topup file containing the field coefficients
argument: ``--topup=%s``
requires: in_topup_movpar
in_topup_movpar: (a pathlike object or string representing an
existing file)
topup movpar.txt file
requires: in_topup_fieldcoef
flm: ('linear' or 'quadratic' or 'cubic')
First level EC model
argument: ``--flm=%s``
slm: ('none' or 'linear' or 'quadratic')
Second level EC model
argument: ``--slm=%s``
fep: (a boolean)
Fill empty planes in x- or y-directions
argument: ``--fep``
interp: ('spline' or 'trilinear')
Interpolation model for estimation step
argument: ``--interp=%s``
nvoxhp: (an integer (int or long), nipype default value: 1000)
# of voxels used to estimate the hyperparameters
argument: ``--nvoxhp=%s``
fudge_factor: (a float, nipype default value: 10.0)
Fudge factor for hyperparameter error variance
argument: ``--ff=%s``
dont_sep_offs_move: (a boolean)
Do NOT attempt to separate field offset from subject movement
argument: ``--dont_sep_offs_move``
dont_peas: (a boolean)
Do NOT perform a post-eddy alignment of shells
argument: ``--dont_peas``
fwhm: (a float)
FWHM for conditioning filter when estimating the parameters
argument: ``--fwhm=%s``
niter: (an integer (int or long), nipype default value: 5)
Number of iterations
argument: ``--niter=%s``
method: ('jac' or 'lsr')
Final resampling method (jacobian/least squares)
argument: ``--resamp=%s``
repol: (a boolean)
Detect and replace outlier slices
argument: ``--repol``
num_threads: (an integer (int or long), nipype default value: 1)
Number of openmp threads to use
is_shelled: (a boolean)
Override internal check to ensure that date are acquired on a set of
b-value shells
argument: ``--data_is_shelled``
field: (a unicode string)
NonTOPUP fieldmap scaled in Hz - filename has to be provided without
an extension. TOPUP is strongly recommended
argument: ``--field=%s``
field_mat: (a pathlike object or string representing an existing
file)
Matrix that specifies the relative locations of the field specified
by --field and first volume in file --imain
argument: ``--field_mat=%s``
use_cuda: (a boolean)
Run eddy using cuda gpu
cnr_maps: (a boolean)
Output CNR-Maps
argument: ``--cnr_maps``
residuals: (a boolean)
Output Residuals
argument: ``--residuals``
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_corrected: (a pathlike object or string representing an existing
file)
4D image file containing all the corrected volumes
out_parameter: (a pathlike object or string representing an existing
file)
text file with parameters definining the field andmovement for each
scan
out_rotated_bvecs: (a pathlike object or string representing an
existing file)
File containing rotated b-values for all volumes
out_movement_rms: (a pathlike object or string representing an
existing file)
Summary of the "total movement" in each volume
out_restricted_movement_rms: (a pathlike object or string
representing an existing file)
Summary of the "total movement" in each volume disregarding
translation in the PE direction
out_shell_alignment_parameters: (a pathlike object or string
representing an existing file)
File containing rigid body movement parameters between the different
shells as estimated by a post-hoc mutual information based
registration
out_outlier_report: (a pathlike object or string representing an
existing file)
Text-file with a plain language report on what outlier slices eddy
has found
out_cnr_maps: (a pathlike object or string representing an existing
file)
path/name of file with the cnr_maps
out_residuals: (a pathlike object or string representing an existing
file)
path/name of file with the residuals
References:¶
None
EddyCorrect¶
Wraps the executable command 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'
Inputs:
[Mandatory]
in_file: (a pathlike object or string representing an existing file)
4D input file
argument: ``%s``, position: 0
ref_num: (an integer (int or long), nipype default value: 0)
reference number
argument: ``%d``, position: 2
[Optional]
out_file: (a pathlike object or string representing a file)
4D output file
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:
eddy_corrected: (a pathlike object or string representing an existing
file)
path/name of 4D eddy corrected output file
References:¶
None
EddyQuad¶
Wraps the executable command 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() # doctest: +SKIP
Inputs:
[Mandatory]
idx_file: (a pathlike object or string representing an existing file)
File containing indices for all volumes into acquisition parameters
argument: ``--eddyIdx %s``
param_file: (a pathlike object or string representing an existing
file)
File containing acquisition parameters
argument: ``--eddyParams %s``
mask_file: (a pathlike object or string representing an existing
file)
Binary mask file
argument: ``--mask %s``
bval_file: (a pathlike object or string representing an existing
file)
b-values file
argument: ``--bvals %s``
[Optional]
base_name: (a unicode string, nipype default value: eddy_corrected)
Basename (including path) for EDDY output files, i.e., corrected
images and QC files
argument: ``%s``, position: 0
bvec_file: (a pathlike object or string representing an existing
file)
b-vectors file - only used when <base_name>.eddy_residuals file is
present
argument: ``--bvecs %s``
output_dir: (a unicode string)
Output directory - default = '<base_name>.qc'
argument: ``--output-dir %s``
field: (a pathlike object or string representing an existing file)
TOPUP estimated field (in Hz)
argument: ``--field %s``
slice_spec: (a pathlike object or string representing an existing
file)
Text file specifying slice/group acquisition
argument: ``--slspec %s``
verbose: (a boolean)
Display debug messages
argument: ``--verbose``
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:
qc_json: (a pathlike object or string representing an existing file)
Single subject database containing quality metrics and data info.
qc_pdf: (a pathlike object or string representing an existing file)
Single subject QC report.
avg_b_png: (a 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.
avg_b0_pe_png: (a 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.
cnr_png: (a 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.
vdm_png: (a 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.
residuals: (a pathlike object or string representing an existing
file)
Text file containing the volume-wise mask-averaged squared
residuals. Generated when residual maps are available.
clean_volumes: (a 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`
References:¶
None
EpiReg¶
Wraps the executable command 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 # doctest: +ELLIPSIS
'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() # doctest: +SKIP
Inputs:
[Mandatory]
epi: (a pathlike object or string representing an existing file)
EPI image
argument: ``--epi=%s``, position: -4
t1_head: (a pathlike object or string representing an existing file)
wholehead T1 image
argument: ``--t1=%s``, position: -3
t1_brain: (a pathlike object or string representing an existing file)
brain extracted T1 image
argument: ``--t1brain=%s``, position: -2
[Optional]
out_base: (a string, nipype default value: epi2struct)
output base name
argument: ``--out=%s``, position: -1
fmap: (a pathlike object or string representing an existing file)
fieldmap image (in rad/s)
argument: ``--fmap=%s``
fmapmag: (a pathlike object or string representing an existing file)
fieldmap magnitude image - wholehead
argument: ``--fmapmag=%s``
fmapmagbrain: (a pathlike object or string representing an existing
file)
fieldmap magnitude image - brain extracted
argument: ``--fmapmagbrain=%s``
wmseg: (a 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
argument: ``--wmseg=%s``
echospacing: (a float)
Effective EPI echo spacing (sometimes called dwell time) - in
seconds
argument: ``--echospacing=%f``
pedir: ('x' or 'y' or 'z' or '-x' or '-y' or '-z')
phase encoding direction, dir = x/y/z/-x/-y/-z
argument: ``--pedir=%s``
weight_image: (a pathlike object or string representing an existing
file)
weighting image (in T1 space)
argument: ``--weight=%s``
no_fmapreg: (a boolean)
do not perform registration of fmap to T1 (use if fmap already
registered)
argument: ``--nofmapreg``
no_clean: (a boolean, nipype default value: True)
do not clean up intermediate files
argument: ``--noclean``
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 pathlike object or string representing an existing file)
unwarped and coregistered epi input
out_1vol: (a pathlike object or string representing an existing file)
unwarped and coregistered single volume
fmap2str_mat: (a pathlike object or string representing an existing
file)
rigid fieldmap-to-structural transform
fmap2epi_mat: (a pathlike object or string representing an existing
file)
rigid fieldmap-to-epi transform
fmap_epi: (a pathlike object or string representing an existing file)
fieldmap in epi space
fmap_str: (a pathlike object or string representing an existing file)
fieldmap in structural space
fmapmag_str: (a pathlike object or string representing an existing
file)
fieldmap magnitude image in structural space
epi2str_inv: (a pathlike object or string representing an existing
file)
rigid structural-to-epi transform
epi2str_mat: (a pathlike object or string representing an existing
file)
rigid epi-to-structural transform
shiftmap: (a pathlike object or string representing an existing file)
shiftmap in epi space
fullwarp: (a pathlike object or string representing an existing file)
warpfield to unwarp epi and transform into structural space
wmseg: (a pathlike object or string representing an existing file)
white matter segmentation used in flirt bbr
seg: (a pathlike object or string representing an existing file)
white matter, gray matter, csf segmentation
wmedge: (a pathlike object or string representing an existing file)
white matter edges for visualization
References:¶
None
PrepareFieldmap¶
Wraps the executable command 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 # doctest: +ELLIPSIS
'fsl_prepare_fieldmap SIEMENS phase.nii magnitude.nii .../phase_fslprepared.nii.gz 2.460000'
>>> res = prepare.run() # doctest: +SKIP
Inputs:
[Mandatory]
in_phase: (a pathlike object or string representing an existing file)
Phase difference map, in SIEMENS format range from 0-4096 or 0-8192)
argument: ``%s``, position: 2
in_magnitude: (a pathlike object or string representing an existing
file)
Magnitude difference map, brain extracted
argument: ``%s``, position: 3
delta_TE: (a float, nipype default value: 2.46)
echo time difference of the fieldmap sequence in ms. (usually 2.46ms
in Siemens)
argument: ``%f``, position: -2
[Optional]
scanner: (a string, nipype default value: SIEMENS)
must be SIEMENS
argument: ``%s``, position: 1
nocheck: (a boolean, nipype default value: False)
do not perform sanity checks for image size/range/dimensions
argument: ``--nocheck``, position: -1
out_fieldmap: (a pathlike object or string representing a file)
output name for prepared fieldmap
argument: ``%s``, position: 4
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_fieldmap: (a pathlike object or string representing an existing
file)
output name for prepared fieldmap
References:¶
None
SigLoss¶
Wraps the executable command 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 # doctest: +ELLIPSIS
'sigloss --te=0.030000 -i phase.nii -s .../phase_sigloss.nii.gz'
>>> res = sigloss.run() # doctest: +SKIP
Inputs:
[Mandatory]
in_file: (a pathlike object or string representing an existing file)
b0 fieldmap file
argument: ``-i %s``
[Optional]
out_file: (a pathlike object or string representing a file)
output signal loss estimate file
argument: ``-s %s``
mask_file: (a pathlike object or string representing an existing
file)
brain mask file
argument: ``-m %s``
echo_time: (a float)
echo time in seconds
argument: ``--te=%f``
slice_direction: ('x' or 'y' or 'z')
slicing direction
argument: ``-d %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: (a pathlike object or string representing an existing file)
signal loss estimate file
References:¶
None
TOPUP¶
Wraps the executable command 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 # doctest: +ELLIPSIS
'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() # doctest: +SKIP
Inputs:
[Mandatory]
in_file: (a pathlike object or string representing an existing file)
name of 4D file with images
argument: ``--imain=%s``
encoding_file: (a pathlike object or string representing an existing
file)
name of text file with PE directions/times
argument: ``--datain=%s``
mutually_exclusive: encoding_direction
encoding_direction: (a list of items which are 'y' or 'x' or 'z' or
'x-' or 'y-' or 'z-')
encoding direction for automatic generation of encoding_file
argument: ``--datain=%s``
mutually_exclusive: encoding_file
requires: readout_times
readout_times: (a list of items which are a float)
readout times (dwell times by # phase-encode steps minus 1)
mutually_exclusive: encoding_file
requires: encoding_direction
[Optional]
out_base: (a pathlike object or string representing a file)
base-name of output files (spline coefficients (Hz) and movement
parameters)
argument: ``--out=%s``
out_field: (a pathlike object or string representing a file)
name of image file with field (Hz)
argument: ``--fout=%s``
out_warp_prefix: (a unicode string, nipype default value: warpfield)
prefix for the warpfield images (in mm)
argument: ``--dfout=%s``
out_mat_prefix: (a unicode string, nipype default value: xfm)
prefix for the realignment matrices
argument: ``--rbmout=%s``
out_jac_prefix: (a unicode string, nipype default value: jac)
prefix for the warpfield images
argument: ``--jacout=%s``
out_corrected: (a pathlike object or string representing a file)
name of 4D image file with unwarped images
argument: ``--iout=%s``
out_logfile: (a pathlike object or string representing a file)
name of log-file
argument: ``--logout=%s``
warp_res: (a float)
(approximate) resolution (in mm) of warp basis for the different
sub-sampling levels
argument: ``--warpres=%f``
subsamp: (an integer (int or long))
sub-sampling scheme
argument: ``--subsamp=%d``
fwhm: (a float)
FWHM (in mm) of gaussian smoothing kernel
argument: ``--fwhm=%f``
config: (a string, nipype default value: b02b0.cnf)
Name of config file specifying command line arguments
argument: ``--config=%s``
max_iter: (an integer (int or long))
max # of non-linear iterations
argument: ``--miter=%d``
reg_lambda: (a float)
Weight of regularisation, default depending on --ssqlambda and
--regmod switches.
argument: ``--lambda=%0.f``
ssqlambda: (1 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.
argument: ``--ssqlambda=%d``
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.
argument: ``--regmod=%s``
estmov: (1 or 0)
estimate movements if set
argument: ``--estmov=%d``
minmet: (0 or 1)
Minimisation method 0=Levenberg-Marquardt, 1=Scaled Conjugate
Gradient
argument: ``--minmet=%d``
splineorder: (an integer (int or long))
order of spline, 2->Qadratic spline, 3->Cubic spline
argument: ``--splineorder=%d``
numprec: ('double' or 'float')
Precision for representing Hessian, double or float.
argument: ``--numprec=%s``
interp: ('spline' or 'linear')
Image interpolation model, linear or spline.
argument: ``--interp=%s``
scale: (0 or 1)
If set (=1), the images are individually scaled to a common mean
argument: ``--scale=%d``
regrid: (1 or 0)
If set (=1), the calculations are done in a different grid
argument: ``--regrid=%d``
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_fieldcoef: (a pathlike object or string representing an existing
file)
file containing the field coefficients
out_movpar: (a pathlike object or string representing an existing
file)
movpar.txt output file
out_enc_file: (a pathlike object or string representing a file)
encoding directions file output for applytopup
out_field: (a pathlike object or string representing a file)
name of image file with field (Hz)
out_warps: (a list of items which are a pathlike object or string
representing an existing file)
warpfield images
out_jacs: (a list of items which are a pathlike object or string
representing an existing file)
Jacobian images
out_mats: (a list of items which are a pathlike object or string
representing an existing file)
realignment matrices
out_corrected: (a pathlike object or string representing a file)
name of 4D image file with unwarped images
out_logfile: (a pathlike object or string representing a file)
name of log-file
References:¶
None