nipype.interfaces.fsl.preprocess module¶
The fsl module provides classes for interfacing with the FSL command line tools. This was written to work with FSL version 4.1.4.
ApplyWarp¶
Bases: FSLCommand
Wrapped executable:
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()
- in_filea pathlike object or string representing an existing file
Image to be warped. Maps to a command-line argument:
--in=%s
(position: 0).- ref_filea pathlike object or string representing an existing file
Reference image. Maps to a command-line argument:
--ref=%s
(position: 1).
- abswarpa boolean
Treat warp field as absolute: x’ = w(x). Maps to a command-line argument:
--abs
. Mutually exclusive with inputs:relwarp
.- 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 [char short int float double]. Maps to a command-line argument:
--datatype=%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:
{}
)- field_filea pathlike object or string representing an existing file
File containing warp field. Maps to a command-line argument:
--warp=%s
.- interp‘nn’ or ‘trilinear’ or ‘sinc’ or ‘spline’
Interpolation method. Maps to a command-line argument:
--interp=%s
(position: -2).- mask_filea pathlike object or string representing an existing file
Filename for mask image (in reference space). Maps to a command-line argument:
--mask=%s
.- out_filea pathlike object or string representing a file
Output filename. Maps to a command-line argument:
--out=%s
(position: 2).- output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’
FSL output type.
- postmata pathlike object or string representing an existing file
Filename for post-transform (affine matrix). Maps to a command-line argument:
--postmat=%s
.- premata pathlike object or string representing an existing file
Filename for pre-transform (affine matrix). Maps to a command-line argument:
--premat=%s
.- relwarpa boolean
Treat warp field as relative: x’ = x + w(x). Maps to a command-line argument:
--rel
(position: -1). Mutually exclusive with inputs:abswarp
.- superlevel‘a’ or an integer
Level of intermediary supersampling, a for ‘automatic’ or integer level. Default = 2. Maps to a command-line argument:
--superlevel=%s
.- supersamplea boolean
Intermediary supersampling of output, default is off. Maps to a command-line argument:
--super
.
- out_filea pathlike object or string representing an existing file
Warped output file.
ApplyXFM¶
Bases: FLIRT
Wrapped executable:
flirt
.Currently just a light wrapper around FLIRT, with no modifications
ApplyXFM is used to apply an existing transform 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()
- in_filea pathlike object or string representing an existing file
Input file. Maps to a command-line argument:
-in %s
(position: 0).- referencea pathlike object or string representing an existing file
Reference file. Maps to a command-line argument:
-ref %s
(position: 1).
- angle_rep‘quaternion’ or ‘euler’
Representation of rotation angles. Maps to a command-line argument:
-anglerep %s
.- apply_isoxfma float
As applyxfm but forces isotropic resampling. Maps to a command-line argument:
-applyisoxfm %f
. Mutually exclusive with inputs:apply_xfm
.- apply_xfma boolean
Apply transformation supplied by in_matrix_file or uses_qform to use the affine matrix stored in the reference header. Maps to a command-line argument:
-applyxfm
. (Nipype default value:True
)- argsa string
Additional parameters to the command. Maps to a command-line argument:
%s
.- bbrslopea float
Value of bbr slope. Maps to a command-line argument:
-bbrslope %f
.- bbrtype‘signed’ or ‘global_abs’ or ‘local_abs’
Type of bbr cost function: signed [default], global_abs, local_abs. Maps to a command-line argument:
-bbrtype %s
.- bgvaluea float
Use specified background value for points outside FOV. Maps to a command-line argument:
-setbackground %f
.- binsan integer
Number of histogram bins. Maps to a command-line argument:
-bins %d
.- coarse_searchan integer
Coarse search delta angle. Maps to a command-line argument:
-coarsesearch %d
.- cost‘mutualinfo’ or ‘corratio’ or ‘normcorr’ or ‘normmi’ or ‘leastsq’ or ‘labeldiff’ or ‘bbr’
Cost function. Maps to a command-line argument:
-cost %s
.- cost_func‘mutualinfo’ or ‘corratio’ or ‘normcorr’ or ‘normmi’ or ‘leastsq’ or ‘labeldiff’ or ‘bbr’
Cost function. Maps to a command-line argument:
-searchcost %s
.- datatype‘char’ or ‘short’ or ‘int’ or ‘float’ or ‘double’
Force output data type. Maps to a command-line argument:
-datatype %s
.- display_inita boolean
Display initial matrix. Maps to a command-line argument:
-displayinit
.- dofan integer
Number of transform degrees of freedom. Maps to a command-line argument:
-dof %d
.- echospacinga float
Value of EPI echo spacing - units of 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:
{}
)- fieldmapa pathlike object or string representing a file
Fieldmap image in rads/s - must be already registered to the reference image. Maps to a command-line argument:
-fieldmap %s
.- fieldmapmaska pathlike object or string representing a file
Mask for fieldmap image. Maps to a command-line argument:
-fieldmapmask %s
.- fine_searchan integer
Fine search delta angle. Maps to a command-line argument:
-finesearch %d
.- force_scalinga boolean
Force rescaling even for low-res images. Maps to a command-line argument:
-forcescaling
.- in_matrix_filea pathlike object or string representing a file
Input 4x4 affine matrix. Maps to a command-line argument:
-init %s
.- in_weighta pathlike object or string representing an existing file
File for input weighting volume. Maps to a command-line argument:
-inweight %s
.- interp‘trilinear’ or ‘nearestneighbour’ or ‘sinc’ or ‘spline’
Final interpolation method used in reslicing. Maps to a command-line argument:
-interp %s
.- min_samplinga float
Set minimum voxel dimension for sampling. Maps to a command-line argument:
-minsampling %f
.- no_clampa boolean
Do not use intensity clamping. Maps to a command-line argument:
-noclamp
.- no_resamplea boolean
Do not change input sampling. Maps to a command-line argument:
-noresample
.- no_resample_blura boolean
Do not use blurring on downsampling. Maps to a command-line argument:
-noresampblur
.- no_searcha boolean
Set all angular searches to ranges 0 to 0. Maps to a command-line argument:
-nosearch
.- out_filea pathlike object or string representing a file
Registered output file. Maps to a command-line argument:
-out %s
(position: 2).- out_loga pathlike object or string representing a file
Output log. Requires inputs:
save_log
.- out_matrix_filea pathlike object or string representing a file
Output affine matrix in 4x4 asciii format. Maps to a command-line argument:
-omat %s
(position: 3).- output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’
FSL output type.
- padding_sizean integer
For applyxfm: interpolates outside image by size. Maps to a command-line argument:
-paddingsize %d
.- pediran integer
Phase encode direction of EPI - 1/2/3=x/y/z & -1/-2/-3=-x/-y/-z. Maps to a command-line argument:
-pedir %d
.- ref_weighta pathlike object or string representing an existing file
File for reference weighting volume. Maps to a command-line argument:
-refweight %s
.- rigid2Da boolean
Use 2D rigid body mode - ignores dof. Maps to a command-line argument:
-2D
.- save_loga boolean
Save to log file.
- schedulea pathlike object or string representing an existing file
Replaces default schedule. Maps to a command-line argument:
-schedule %s
.- searchr_xa list of from 2 to 2 items which are an integer
Search angles along x-axis, in degrees. Maps to a command-line argument:
-searchrx %s
.- searchr_ya list of from 2 to 2 items which are an integer
Search angles along y-axis, in degrees. Maps to a command-line argument:
-searchry %s
.- searchr_za list of from 2 to 2 items which are an integer
Search angles along z-axis, in degrees. Maps to a command-line argument:
-searchrz %s
.- sinc_widthan integer
Full-width in voxels. Maps to a command-line argument:
-sincwidth %d
.- sinc_window‘rectangular’ or ‘hanning’ or ‘blackman’
Sinc window. Maps to a command-line argument:
-sincwindow %s
.- uses_qforma boolean
Initialize using sform or qform. Maps to a command-line argument:
-usesqform
.- verbosean integer
Verbose mode, 0 is least. Maps to a command-line argument:
-verbose %d
.- wm_sega pathlike object or string representing a file
White matter segmentation volume needed by BBR cost function. Maps to a command-line argument:
-wmseg %s
.- wmcoordsa pathlike object or string representing a file
White matter boundary coordinates for BBR cost function. Maps to a command-line argument:
-wmcoords %s
.- wmnormsa pathlike object or string representing a file
White matter boundary normals for BBR cost function. Maps to a command-line argument:
-wmnorms %s
.
- out_filea pathlike object or string representing an existing file
Path/name of registered file (if generated).
- out_loga pathlike object or string representing a file
Path/name of output log (if generated).
- out_matrix_filea pathlike object or string representing an existing file
Path/name of calculated affine transform (if generated).
BET¶
Bases: FSLCommand
Wrapped executable:
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()
- in_filea pathlike object or string representing an existing file
Input file to skull strip. Maps to a command-line argument:
%s
(position: 0).
- argsa string
Additional parameters to the command. Maps to a command-line argument:
%s
.- centera list of at most 3 items which are an integer
Center of gravity in voxels. Maps to a command-line argument:
-c %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:
{}
)- fraca float
Fractional intensity threshold. Maps to a command-line argument:
-f %.2f
.- functionala boolean
Apply to 4D fMRI data. Maps to a command-line argument:
-F
. Mutually exclusive with inputs:functional
,reduce_bias
,robust
,padding
,remove_eyes
,surfaces
,t2_guided
.- maska boolean
Create binary mask image. Maps to a command-line argument:
-m
.- mesha boolean
Generate a vtk mesh brain surface. Maps to a command-line argument:
-e
.- no_outputa boolean
Don’t generate segmented output. Maps to a command-line argument:
-n
.- out_filea pathlike object or string representing a file
Name of output skull stripped image. Maps to a command-line argument:
%s
(position: 1).- outlinea boolean
Create surface outline image. Maps to a command-line argument:
-o
.- output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’
FSL output type.
- paddinga boolean
Improve BET if FOV is very small in Z (by temporarily padding end slices). Maps to a command-line argument:
-Z
. Mutually exclusive with inputs:functional
,reduce_bias
,robust
,padding
,remove_eyes
,surfaces
,t2_guided
.- radiusan integer
Head radius. Maps to a command-line argument:
-r %d
.- reduce_biasa boolean
Bias field and neck cleanup. Maps to a command-line argument:
-B
. Mutually exclusive with inputs:functional
,reduce_bias
,robust
,padding
,remove_eyes
,surfaces
,t2_guided
.- remove_eyesa boolean
Eye & optic nerve cleanup (can be useful in SIENA). Maps to a command-line argument:
-S
. Mutually exclusive with inputs:functional
,reduce_bias
,robust
,padding
,remove_eyes
,surfaces
,t2_guided
.- robusta boolean
Robust brain centre estimation (iterates BET several times). Maps to a command-line argument:
-R
. Mutually exclusive with inputs:functional
,reduce_bias
,robust
,padding
,remove_eyes
,surfaces
,t2_guided
.- skulla boolean
Create skull image. Maps to a command-line argument:
-s
.- surfacesa boolean
Run bet2 and then betsurf to get additional skull and scalp surfaces (includes registrations). Maps to a command-line argument:
-A
. Mutually exclusive with inputs:functional
,reduce_bias
,robust
,padding
,remove_eyes
,surfaces
,t2_guided
.- t2_guideda pathlike object or string representing a file
As with creating surfaces, when also feeding in non-brain-extracted T2 (includes registrations). Maps to a command-line argument:
-A2 %s
. Mutually exclusive with inputs:functional
,reduce_bias
,robust
,padding
,remove_eyes
,surfaces
,t2_guided
.- thresholda boolean
Apply thresholding to segmented brain image and mask. Maps to a command-line argument:
-t
.- vertical_gradienta float
Vertical gradient in fractional intensity threshold (-1, 1). Maps to a command-line argument:
-g %.2f
.
- inskull_mask_filea pathlike object or string representing a file
Path/name of inskull mask (if generated).
- inskull_mesh_filea pathlike object or string representing a file
Path/name of inskull mesh outline (if generated).
- mask_filea pathlike object or string representing a file
Path/name of binary brain mask (if generated).
- meshfilea pathlike object or string representing a file
Path/name of vtk mesh file (if generated).
- out_filea pathlike object or string representing a file
Path/name of skullstripped file (if generated).
- outline_filea pathlike object or string representing a file
Path/name of outline file (if generated).
- outskin_mask_filea pathlike object or string representing a file
Path/name of outskin mask (if generated).
- outskin_mesh_filea pathlike object or string representing a file
Path/name of outskin mesh outline (if generated).
- outskull_mask_filea pathlike object or string representing a file
Path/name of outskull mask (if generated).
- outskull_mesh_filea pathlike object or string representing a file
Path/name of outskull mesh outline (if generated).
- skull_filea pathlike object or string representing a file
Path/name of skull file (if generated).
- skull_mask_filea pathlike object or string representing a file
Path/name of skull mask (if generated).
FAST¶
Bases: FSLCommand
Wrapped executable:
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()
- in_filesa list of items which are a pathlike object or string representing an existing file
Image, or multi-channel set of images, to be segmented. Maps to a command-line argument:
%s
(position: -1).
- argsa string
Additional parameters to the command. Maps to a command-line argument:
%s
.- bias_iters1 <= an integer <= 10
Number of main-loop iterations during bias-field removal. Maps to a command-line argument:
-I %d
.- bias_lowpass4 <= an integer <= 40
Bias field smoothing extent (FWHM) in mm. Maps to a command-line argument:
-l %d
.- 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:
{}
)- hyper0.0 <= a floating point number <= 1.0
Segmentation spatial smoothness. Maps to a command-line argument:
-H %.2f
.- img_type1 or 2 or 3
Int specifying type of image: (1 = T1, 2 = T2, 3 = PD). Maps to a command-line argument:
-t %d
.- init_seg_smooth0.0001 <= a floating point number <= 0.1
Initial segmentation spatial smoothness (during bias field estimation). Maps to a command-line argument:
-f %.3f
.- init_transforma pathlike object or string representing an existing file
<standard2input.mat> initialise using priors. Maps to a command-line argument:
-a %s
.- iters_afterbias1 <= an integer <= 20
Number of main-loop iterations after bias-field removal. Maps to a command-line argument:
-O %d
.- manual_sega pathlike object or string representing an existing file
Filename containing intensities. Maps to a command-line argument:
-s %s
.- mixel_smooth0.0 <= a floating point number <= 1.0
Spatial smoothness for mixeltype. Maps to a command-line argument:
-R %.2f
.- no_biasa boolean
Do not remove bias field. Maps to a command-line argument:
-N
.- no_pvea boolean
Turn off PVE (partial volume estimation). Maps to a command-line argument:
--nopve
.- number_classes1 <= an integer <= 10
Number of tissue-type classes. Maps to a command-line argument:
-n %d
.- other_priorsa list of from 3 to 3 items which are a pathlike object or string representing a file
Alternative prior images. Maps to a command-line argument:
-A %s
.- out_basenamea pathlike object or string representing a file
Base name of output files. Maps to a command-line argument:
-o %s
.- output_biascorrecteda boolean
Output restored image (bias-corrected image). Maps to a command-line argument:
-B
.- output_biasfielda boolean
Output estimated bias field. Maps to a command-line argument:
-b
.- output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’
FSL output type.
- probability_mapsa boolean
Outputs individual probability maps. Maps to a command-line argument:
-p
.- segment_iters1 <= an integer <= 50
Number of segmentation-initialisation iterations. Maps to a command-line argument:
-W %d
.- segmentsa boolean
Outputs a separate binary image for each tissue type. Maps to a command-line argument:
-g
.- use_priorsa boolean
Use priors throughout. Maps to a command-line argument:
-P
.- verbosea boolean
Switch on diagnostic messages. Maps to a command-line argument:
-v
.bias_field : a list of items which are a pathlike object or string representing a file mixeltype : a pathlike object or string representing a file
Path/name of mixeltype volume file _mixeltype.
partial_volume_files : a list of items which are a pathlike object or string representing a file partial_volume_map : a pathlike object or string representing a file
Path/name of partial volume file _pveseg.
probability_maps : a list of items which are a pathlike object or string representing a file restored_image : a list of items which are a pathlike object or string representing a file tissue_class_files : a list of items which are a pathlike object or string representing a file tissue_class_map : a pathlike object or string representing an existing file
Path/name of binary segmented volume file one val for each class _seg.
FIRST¶
Bases: FSLCommand
Wrapped executable:
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()
- in_filea pathlike object or string representing an existing file
Input data file. Maps to a command-line argument:
-i %s
(position: -2).- out_filea pathlike object or string representing a file
Output data file. Maps to a command-line argument:
-o %s
(position: -1). (Nipype default value:segmented
)
- affine_filea pathlike object or string representing an existing file
Affine matrix to use (e.g. img2std.mat) (does not re-run registration). Maps to a command-line argument:
-a %s
(position: 6).- argsa string
Additional parameters to the command. Maps to a command-line argument:
%s
.- brain_extracteda boolean
Input structural image is already brain-extracted. Maps to a command-line argument:
-b
(position: 2).- 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:
{}
)- list_of_specific_structuresa list of at least 1 items which are a 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. Maps to a command-line argument:
-s %s
(position: 5).- method‘auto’ or ‘fast’ or ‘none’
Method must be one of auto, fast, none, or it can be entered using the ‘method_as_numerical_threshold’ input. Maps to a command-line argument:
-m %s
(position: 4). Mutually exclusive with inputs:method_as_numerical_threshold
. (Nipype default value:auto
)- method_as_numerical_thresholda float
Specify a numerical threshold value or use the ‘method’ input to choose auto, fast, or none. Maps to a command-line argument:
-m %.4f
(position: 4).- no_cleanupa boolean
Input structural image is already brain-extracted. Maps to a command-line argument:
-d
(position: 3).- output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’
FSL output type.
- verbosea boolean
Use verbose logging. Maps to a command-line argument:
-v
(position: 1).
- bvarsa list of items which are a pathlike object or string representing an existing file
Bvars for each subcortical region.
- original_segmentationsa pathlike object or string representing an existing file
3D image file containing the segmented regions as integer values. Uses CMA labelling.
- segmentation_filea pathlike object or string representing an existing file
4D image file containing a single volume per segmented region.
- vtk_surfacesa list of items which are a pathlike object or string representing an existing file
VTK format meshes for each subcortical region.
FLIRT¶
Bases: FSLCommand
Wrapped executable:
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()
- in_filea pathlike object or string representing an existing file
Input file. Maps to a command-line argument:
-in %s
(position: 0).- referencea pathlike object or string representing an existing file
Reference file. Maps to a command-line argument:
-ref %s
(position: 1).
- angle_rep‘quaternion’ or ‘euler’
Representation of rotation angles. Maps to a command-line argument:
-anglerep %s
.- apply_isoxfma float
As applyxfm but forces isotropic resampling. Maps to a command-line argument:
-applyisoxfm %f
. Mutually exclusive with inputs:apply_xfm
.- apply_xfma boolean
Apply transformation supplied by in_matrix_file or uses_qform to use the affine matrix stored in the reference header. Maps to a command-line argument:
-applyxfm
.- argsa string
Additional parameters to the command. Maps to a command-line argument:
%s
.- bbrslopea float
Value of bbr slope. Maps to a command-line argument:
-bbrslope %f
.- bbrtype‘signed’ or ‘global_abs’ or ‘local_abs’
Type of bbr cost function: signed [default], global_abs, local_abs. Maps to a command-line argument:
-bbrtype %s
.- bgvaluea float
Use specified background value for points outside FOV. Maps to a command-line argument:
-setbackground %f
.- binsan integer
Number of histogram bins. Maps to a command-line argument:
-bins %d
.- coarse_searchan integer
Coarse search delta angle. Maps to a command-line argument:
-coarsesearch %d
.- cost‘mutualinfo’ or ‘corratio’ or ‘normcorr’ or ‘normmi’ or ‘leastsq’ or ‘labeldiff’ or ‘bbr’
Cost function. Maps to a command-line argument:
-cost %s
.- cost_func‘mutualinfo’ or ‘corratio’ or ‘normcorr’ or ‘normmi’ or ‘leastsq’ or ‘labeldiff’ or ‘bbr’
Cost function. Maps to a command-line argument:
-searchcost %s
.- datatype‘char’ or ‘short’ or ‘int’ or ‘float’ or ‘double’
Force output data type. Maps to a command-line argument:
-datatype %s
.- display_inita boolean
Display initial matrix. Maps to a command-line argument:
-displayinit
.- dofan integer
Number of transform degrees of freedom. Maps to a command-line argument:
-dof %d
.- echospacinga float
Value of EPI echo spacing - units of 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:
{}
)- fieldmapa pathlike object or string representing a file
Fieldmap image in rads/s - must be already registered to the reference image. Maps to a command-line argument:
-fieldmap %s
.- fieldmapmaska pathlike object or string representing a file
Mask for fieldmap image. Maps to a command-line argument:
-fieldmapmask %s
.- fine_searchan integer
Fine search delta angle. Maps to a command-line argument:
-finesearch %d
.- force_scalinga boolean
Force rescaling even for low-res images. Maps to a command-line argument:
-forcescaling
.- in_matrix_filea pathlike object or string representing a file
Input 4x4 affine matrix. Maps to a command-line argument:
-init %s
.- in_weighta pathlike object or string representing an existing file
File for input weighting volume. Maps to a command-line argument:
-inweight %s
.- interp‘trilinear’ or ‘nearestneighbour’ or ‘sinc’ or ‘spline’
Final interpolation method used in reslicing. Maps to a command-line argument:
-interp %s
.- min_samplinga float
Set minimum voxel dimension for sampling. Maps to a command-line argument:
-minsampling %f
.- no_clampa boolean
Do not use intensity clamping. Maps to a command-line argument:
-noclamp
.- no_resamplea boolean
Do not change input sampling. Maps to a command-line argument:
-noresample
.- no_resample_blura boolean
Do not use blurring on downsampling. Maps to a command-line argument:
-noresampblur
.- no_searcha boolean
Set all angular searches to ranges 0 to 0. Maps to a command-line argument:
-nosearch
.- out_filea pathlike object or string representing a file
Registered output file. Maps to a command-line argument:
-out %s
(position: 2).- out_loga pathlike object or string representing a file
Output log. Requires inputs:
save_log
.- out_matrix_filea pathlike object or string representing a file
Output affine matrix in 4x4 asciii format. Maps to a command-line argument:
-omat %s
(position: 3).- output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’
FSL output type.
- padding_sizean integer
For applyxfm: interpolates outside image by size. Maps to a command-line argument:
-paddingsize %d
.- pediran integer
Phase encode direction of EPI - 1/2/3=x/y/z & -1/-2/-3=-x/-y/-z. Maps to a command-line argument:
-pedir %d
.- ref_weighta pathlike object or string representing an existing file
File for reference weighting volume. Maps to a command-line argument:
-refweight %s
.- rigid2Da boolean
Use 2D rigid body mode - ignores dof. Maps to a command-line argument:
-2D
.- save_loga boolean
Save to log file.
- schedulea pathlike object or string representing an existing file
Replaces default schedule. Maps to a command-line argument:
-schedule %s
.- searchr_xa list of from 2 to 2 items which are an integer
Search angles along x-axis, in degrees. Maps to a command-line argument:
-searchrx %s
.- searchr_ya list of from 2 to 2 items which are an integer
Search angles along y-axis, in degrees. Maps to a command-line argument:
-searchry %s
.- searchr_za list of from 2 to 2 items which are an integer
Search angles along z-axis, in degrees. Maps to a command-line argument:
-searchrz %s
.- sinc_widthan integer
Full-width in voxels. Maps to a command-line argument:
-sincwidth %d
.- sinc_window‘rectangular’ or ‘hanning’ or ‘blackman’
Sinc window. Maps to a command-line argument:
-sincwindow %s
.- uses_qforma boolean
Initialize using sform or qform. Maps to a command-line argument:
-usesqform
.- verbosean integer
Verbose mode, 0 is least. Maps to a command-line argument:
-verbose %d
.- wm_sega pathlike object or string representing a file
White matter segmentation volume needed by BBR cost function. Maps to a command-line argument:
-wmseg %s
.- wmcoordsa pathlike object or string representing a file
White matter boundary coordinates for BBR cost function. Maps to a command-line argument:
-wmcoords %s
.- wmnormsa pathlike object or string representing a file
White matter boundary normals for BBR cost function. Maps to a command-line argument:
-wmnorms %s
.
- out_filea pathlike object or string representing an existing file
Path/name of registered file (if generated).
- out_loga pathlike object or string representing a file
Path/name of output log (if generated).
- out_matrix_filea pathlike object or string representing an existing file
Path/name of calculated affine transform (if generated).
- FLIRT.aggregate_outputs(runtime=None, needed_outputs=None)¶
Collate expected outputs and apply output traits validation.
FNIRT¶
Bases: FSLCommand
Wrapped executable:
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'
- in_filea pathlike object or string representing an existing file
Name of input image. Maps to a command-line argument:
--in=%s
.- ref_filea pathlike object or string representing an existing file
Name of reference image. Maps to a command-line argument:
--ref=%s
.
- affine_filea pathlike object or string representing an existing file
Name of file containing affine transform. Maps to a command-line argument:
--aff=%s
.- apply_inmaska list of items which are 0 or 1
List of iterations to use input mask on (1 to use, 0 to skip). Maps to a command-line argument:
--applyinmask=%s
. Mutually exclusive with inputs:skip_inmask
.- apply_intensity_mappinga list of items which are 0 or 1
List of subsampling levels to apply intensity mapping for (0 to skip, 1 to apply). Maps to a command-line argument:
--estint=%s
. Mutually exclusive with inputs:skip_intensity_mapping
.- apply_refmaska list of items which are 0 or 1
List of iterations to use reference mask on (1 to use, 0 to skip). Maps to a command-line argument:
--applyrefmask=%s
. Mutually exclusive with inputs:skip_refmask
.- argsa string
Additional parameters to the command. Maps to a command-line argument:
%s
.- bias_regularization_lambdaa float
Weight of regularisation for bias-field, default 10000. Maps to a command-line argument:
--biaslambda=%f
.- biasfield_resolutiona tuple of the form: (an integer, an integer, an integer)
Resolution (in mm) of bias-field modelling local intensities, default 50, 50, 50. Maps to a command-line argument:
--biasres=%d,%d,%d
.- config_file‘T1_2_MNI152_2mm’ or ‘FA_2_FMRIB58_1mm’ or a pathlike object or string representing an existing file
Name of config file specifying command line arguments. Maps to a command-line argument:
--config=%s
.- derive_from_refa boolean
If true, ref image is used to calculate derivatives. Default false. Maps to a command-line argument:
--refderiv
.- 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:
{}
)- field_filea boolean or a pathlike object or string representing a file
Name of output file with field or true. Maps to a command-line argument:
--fout=%s
.- fieldcoeff_filea boolean or a pathlike object or string representing a file
Name of output file with field coefficients or true. Maps to a command-line argument:
--cout=%s
.- hessian_precision‘double’ or ‘float’
Precision for representing Hessian, double or float. Default double. Maps to a command-line argument:
--numprec=%s
.- in_fwhma list of items which are an integer
FWHM (in mm) of gaussian smoothing kernel for input volume, default [6, 4, 2, 2]. Maps to a command-line argument:
--infwhm=%s
.- in_intensitymap_filea list of from 1 to 2 items which are a pathlike object or string representing an existing file
Name of file/files containing initial intensity mapping usually generated by previous fnirt run. Maps to a command-line argument:
--intin=%s
.- inmask_filea pathlike object or string representing an existing file
Name of file with mask in input image space. Maps to a command-line argument:
--inmask=%s
.- inmask_vala float
Value to mask out in –in image. Default =0.0. Maps to a command-line argument:
--impinval=%f
.- 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. Maps to a command-line argument:
--intmod=%s
.- intensity_mapping_orderan integer
Order of poynomial for mapping intensities, default 5. Maps to a command-line argument:
--intorder=%d
.- inwarp_filea pathlike object or string representing an existing file
Name of file containing initial non-linear warps. Maps to a command-line argument:
--inwarp=%s
.- jacobian_filea boolean or a pathlike object or string representing a file
Name of file for writing out the Jacobian of the field (for diagnostic or VBM purposes). Maps to a command-line argument:
--jout=%s
.- jacobian_rangea tuple of the form: (a float, a float)
Allowed range of Jacobian determinants, default 0.01, 100.0. Maps to a command-line argument:
--jacrange=%f,%f
.- log_filea pathlike object or string representing a file
Name of log-file. Maps to a command-line argument:
--logout=%s
.- max_nonlin_itera list of items which are an integer
Max # of non-linear iterations list, default [5, 5, 5, 5]. Maps to a command-line argument:
--miter=%s
.- modulatedref_filea boolean or a pathlike object or string representing a file
Name of file for writing out intensity modulated –ref (for diagnostic purposes). Maps to a command-line argument:
--refout=%s
.- out_intensitymap_filea boolean or a pathlike object or string representing a file
Name of files for writing information pertaining to intensity mapping. Maps to a command-line argument:
--intout=%s
.- output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’
FSL output type.
- ref_fwhma list of items which are an integer
FWHM (in mm) of gaussian smoothing kernel for ref volume, default [4, 2, 0, 0]. Maps to a command-line argument:
--reffwhm=%s
.- refmask_filea pathlike object or string representing an existing file
Name of file with mask in reference space. Maps to a command-line argument:
--refmask=%s
.- refmask_vala float
Value to mask out in –ref image. Default =0.0. Maps to a command-line argument:
--imprefval=%f
.- regularization_lambdaa list of items which are a float
Weight of regularisation, default depending on –ssqlambda and –regmod switches. See user documentation. Maps to a command-line argument:
--lambda=%s
.- regularization_model‘membrane_energy’ or ‘bending_energy’
Model for regularisation of warp-field [membrane_energy bending_energy], default bending_energy. Maps to a command-line argument:
--regmod=%s
.- skip_implicit_in_maskinga boolean
Skip implicit masking based on value in –in image. Default = 0. Maps to a command-line argument:
--impinm=0
.- skip_implicit_ref_maskinga boolean
Skip implicit masking based on value in –ref image. Default = 0. Maps to a command-line argument:
--imprefm=0
.- skip_inmaska boolean
Skip specified inmask if set, default false. Maps to a command-line argument:
--applyinmask=0
. Mutually exclusive with inputs:apply_inmask
.- skip_intensity_mappinga boolean
Skip estimate intensity-mapping default false. Maps to a command-line argument:
--estint=0
. Mutually exclusive with inputs:apply_intensity_mapping
.- skip_lambda_ssqa boolean
If true, lambda is not weighted by current ssq, default false. Maps to a command-line argument:
--ssqlambda=0
.- skip_refmaska boolean
Skip specified refmask if set, default false. Maps to a command-line argument:
--applyrefmask=0
. Mutually exclusive with inputs:apply_refmask
.- spline_orderan integer
Order of spline, 2->Qadratic spline, 3->Cubic spline. Default=3. Maps to a command-line argument:
--splineorder=%d
.- subsampling_schemea list of items which are an integer
Sub-sampling scheme, list, default [4, 2, 1, 1]. Maps to a command-line argument:
--subsamp=%s
.- warp_resolutiona tuple of the form: (an integer, an integer, an integer)
(approximate) resolution (in mm) of warp basis in x-, y- and z-direction, default 10, 10, 10. Maps to a command-line argument:
--warpres=%d,%d,%d
.- warped_filea pathlike object or string representing a file
Name of output image. Maps to a command-line argument:
--iout=%s
.
- field_filea pathlike object or string representing a file
File with warp field.
- fieldcoeff_filea pathlike object or string representing an existing file
File with field coefficients.
- jacobian_filea pathlike object or string representing a file
File containing Jacobian of the field.
- log_filea pathlike object or string representing a file
Name of log-file.
- modulatedref_filea pathlike object or string representing a file
File containing intensity modulated –ref.
- out_intensitymap_filea list of from 2 to 2 items which are a pathlike object or string representing a file
Files containing info pertaining to intensity mapping.
- warped_filea pathlike object or string representing an existing file
Warped image.
- FNIRT.filemap = {'field_file': 'field', 'fieldcoeff_file': 'fieldwarp', 'jacobian_file': 'field_jacobian', 'log_file': 'log.txt', 'modulatedref_file': 'modulated', 'out_intensitymap_file': 'intmap', 'warped_file': 'warped'}¶
- classmethod FNIRT.intensitymap_file_basename(f)¶
Removes valid intensitymap extensions from f, returning a basename that can refer to both intensitymap files.
- FNIRT.write_config(configfile)¶
Writes out currently set options to specified config file
XX TODO : need to figure out how the config file is written
- Parameters:
configfile (/path/to/configfile) –
FUGUE¶
Bases: FSLCommand
Wrapped executable:
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
improving registration with non-distorted images (e.g. structurals), or
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()
- argsa string
Additional parameters to the command. Maps to a command-line argument:
%s
.- asym_se_timea float
Set the fieldmap asymmetric spin echo time (sec). Maps to a command-line argument:
--asym=%.10f
.- despike_2dfiltera boolean
Apply a 2D de-spiking filter. Maps to a command-line argument:
--despike
.- despike_thresholda float
Specify the threshold for de-spiking (default=3.0). Maps to a command-line argument:
--despikethreshold=%s
.- dwell_timea float
Set the EPI dwell time per phase-encode line - same as echo spacing - (sec). Maps to a command-line argument:
--dwell=%.10f
.- dwell_to_asym_ratioa float
Set the dwell to asym time ratio. Maps to a command-line argument:
--dwelltoasym=%.10f
.- 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:
{}
)- fmap_in_filea pathlike object or string representing an existing file
Filename for loading fieldmap (rad/s). Maps to a command-line argument:
--loadfmap=%s
.- fmap_out_filea pathlike object or string representing a file
Filename for saving fieldmap (rad/s). Maps to a command-line argument:
--savefmap=%s
.- forward_warpinga boolean
Apply forward warping instead of unwarping. (Nipype default value:
False
)- fourier_orderan integer
Apply Fourier (sinusoidal) fitting of order N. Maps to a command-line argument:
--fourier=%d
.- icorra boolean
Apply intensity correction to unwarping (pixel shift method only). Maps to a command-line argument:
--icorr
. Requires inputs:shift_in_file
.- icorr_onlya boolean
Apply intensity correction only. Maps to a command-line argument:
--icorronly
. Requires inputs:unwarped_file
.- in_filea pathlike object or string representing an existing file
Filename of input volume. Maps to a command-line argument:
--in=%s
.- mask_filea pathlike object or string representing an existing file
Filename for loading valid mask. Maps to a command-line argument:
--mask=%s
.- median_2dfiltera boolean
Apply 2D median filtering. Maps to a command-line argument:
--median
.- no_extenda boolean
Do not apply rigid-body extrapolation to the fieldmap. Maps to a command-line argument:
--noextend
.- no_gap_filla boolean
Do not apply gap-filling measure to the fieldmap. Maps to a command-line argument:
--nofill
.- nokspacea boolean
Do not use k-space forward warping. Maps to a command-line argument:
--nokspace
.- output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’
FSL output type.
- pavaa boolean
Apply monotonic enforcement via PAVA. Maps to a command-line argument:
--pava
.- phase_conjugatea boolean
Apply phase conjugate method of unwarping. Maps to a command-line argument:
--phaseconj
.- phasemap_in_filea pathlike object or string representing an existing file
Filename for input phase image. Maps to a command-line argument:
--phasemap=%s
.- poly_orderan integer
Apply polynomial fitting of order N. Maps to a command-line argument:
--poly=%d
.- save_fmapa boolean
Write field map volume. Mutually exclusive with inputs:
save_unmasked_fmap
.- save_shifta boolean
Write pixel shift volume. Mutually exclusive with inputs:
save_unmasked_shift
.- save_unmasked_fmapa boolean
Saves the unmasked fieldmap when using –savefmap. Maps to a command-line argument:
--unmaskfmap
. Mutually exclusive with inputs:save_fmap
.- save_unmasked_shifta boolean
Saves the unmasked shiftmap when using –saveshift. Maps to a command-line argument:
--unmaskshift
. Mutually exclusive with inputs:save_shift
.- shift_in_filea pathlike object or string representing an existing file
Filename for reading pixel shift volume. Maps to a command-line argument:
--loadshift=%s
.- shift_out_filea pathlike object or string representing a file
Filename for saving pixel shift volume. Maps to a command-line argument:
--saveshift=%s
.- smooth2da float
Apply 2D Gaussian smoothing of sigma N (in mm). Maps to a command-line argument:
--smooth2=%.2f
.- smooth3da float
Apply 3D Gaussian smoothing of sigma N (in mm). Maps to a command-line argument:
--smooth3=%.2f
.- unwarp_direction‘x’ or ‘y’ or ‘z’ or ‘x-’ or ‘y-’ or ‘z-’
Specifies direction of warping (default y). Maps to a command-line argument:
--unwarpdir=%s
.- unwarped_filea pathlike object or string representing a file
Apply unwarping and save as filename. Maps to a command-line argument:
--unwarp=%s
. Mutually exclusive with inputs:warped_file
. Requires inputs:in_file
.- warped_filea pathlike object or string representing a file
Apply forward warping and save as filename. Maps to a command-line argument:
--warp=%s
. Mutually exclusive with inputs:unwarped_file
. Requires inputs:in_file
.
- fmap_out_filea pathlike object or string representing a file
Fieldmap file.
- shift_out_filea pathlike object or string representing a file
Voxel shift map file.
- unwarped_filea pathlike object or string representing a file
Unwarped file.
- warped_filea pathlike object or string representing a file
Forward warped file.
MCFLIRT¶
Bases: FSLCommand
Wrapped executable:
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()
- in_filea pathlike object or string representing an existing file
Timeseries to motion-correct. Maps to a command-line argument:
-in %s
(position: 0).
- argsa string
Additional parameters to the command. Maps to a command-line argument:
%s
.- binsan integer
Number of histogram bins. Maps to a command-line argument:
-bins %d
.- cost‘mutualinfo’ or ‘woods’ or ‘corratio’ or ‘normcorr’ or ‘normmi’ or ‘leastsquares’
Cost function to optimize. Maps to a command-line argument:
-cost %s
.- dofan integer
Degrees of freedom for the transformation. Maps to a command-line argument:
-dof %d
.- 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:
{}
)- inita pathlike object or string representing an existing file
Initial transformation matrix. Maps to a command-line argument:
-init %s
.- interpolation‘spline’ or ‘nn’ or ‘sinc’
Interpolation method for transformation. Maps to a command-line argument:
-%s_final
.- mean_vola boolean
Register to mean volume. Maps to a command-line argument:
-meanvol
.- out_filea pathlike object or string representing a file
File to write. Maps to a command-line argument:
-out %s
.- output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’
FSL output type.
- ref_filea pathlike object or string representing an existing file
Target image for motion correction. Maps to a command-line argument:
-reffile %s
.- ref_volan integer
Volume to align frames to. Maps to a command-line argument:
-refvol %d
.- rotationan integer
Scaling factor for rotation tolerances. Maps to a command-line argument:
-rotation %d
.- save_matsa boolean
Save transformation matrices. Maps to a command-line argument:
-mats
.- save_plotsa boolean
Save transformation parameters. Maps to a command-line argument:
-plots
.- save_rmsa boolean
Save rms displacement parameters. Maps to a command-line argument:
-rmsabs -rmsrel
.- scalinga float
Scaling factor to use. Maps to a command-line argument:
-scaling %.2f
.- smootha float
Smoothing factor for the cost function. Maps to a command-line argument:
-smooth %.2f
.- stagesan integer
Stages (if 4, perform final search with sinc interpolation. Maps to a command-line argument:
-stages %d
.- stats_imgsa boolean
Produce variance and std. dev. images. Maps to a command-line argument:
-stats
.- use_contoura boolean
Run search on contour images. Maps to a command-line argument:
-edge
.- use_gradienta boolean
Run search on gradient images. Maps to a command-line argument:
-gdt
.
- mat_filea list of items which are a pathlike object or string representing an existing file
Transformation matrices.
- mean_imga pathlike object or string representing an existing file
Mean timeseries image (if mean_vol=True).
- out_filea pathlike object or string representing an existing file
Motion-corrected timeseries.
- par_filea pathlike object or string representing an existing file
Text-file with motion parameters.
- rms_filesa list of items which are a pathlike object or string representing an existing file
Absolute and relative displacement parameters.
- std_imga pathlike object or string representing an existing file
Standard deviation image.
- variance_imga pathlike object or string representing an existing file
Variance image.
PRELUDE¶
Bases: FSLCommand
Wrapped executable:
prelude
.FSL prelude wrapper for phase unwrapping
Examples
Please insert examples for use of this command
- complex_phase_filea pathlike object or string representing an existing file
Complex phase input volume. Maps to a command-line argument:
--complex=%s
. Mutually exclusive with inputs:magnitude_file
,phase_file
.- magnitude_filea pathlike object or string representing an existing file
File containing magnitude image. Maps to a command-line argument:
--abs=%s
. Mutually exclusive with inputs:complex_phase_file
.- phase_filea pathlike object or string representing an existing file
Raw phase file. Maps to a command-line argument:
--phase=%s
. Mutually exclusive with inputs:complex_phase_file
.
- argsa string
Additional parameters to the command. Maps to a command-line argument:
%s
.- endan integer
Final image number to process (default Inf). Maps to a command-line argument:
--end=%d
.- 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:
{}
)- label_filea pathlike object or string representing a file
Saving the area labels output. Maps to a command-line argument:
--labels=%s
.- labelprocess2da boolean
Does label processing in 2D (slice at a time). Maps to a command-line argument:
--labelslices
.- mask_filea pathlike object or string representing an existing file
Filename of mask input volume. Maps to a command-line argument:
--mask=%s
.- num_partitionsan integer
Number of phase partitions to use. Maps to a command-line argument:
--numphasesplit=%d
.- output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’
FSL output type.
- process2da boolean
Does all processing in 2D (slice at a time). Maps to a command-line argument:
--slices
. Mutually exclusive with inputs:labelprocess2d
.- process3da boolean
Forces all processing to be full 3D. Maps to a command-line argument:
--force3D
. Mutually exclusive with inputs:labelprocess2d
,process2d
.- rawphase_filea pathlike object or string representing a file
Saving the raw phase output. Maps to a command-line argument:
--rawphase=%s
.- removerampsa boolean
Remove phase ramps during unwrapping. Maps to a command-line argument:
--removeramps
.- savemask_filea pathlike object or string representing a file
Saving the mask volume. Maps to a command-line argument:
--savemask=%s
.- startan integer
First image number to process (default 0). Maps to a command-line argument:
--start=%d
.- thresholda float
Intensity threshold for masking. Maps to a command-line argument:
--thresh=%.10f
.- unwrapped_phase_filea pathlike object or string representing a file
File containing unwrapepd phase. Maps to a command-line argument:
--unwrap=%s
.
- unwrapped_phase_filea pathlike object or string representing an existing file
Unwrapped phase file.
SUSAN¶
Bases: FSLCommand
Wrapped executable:
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()
- brightness_thresholda float
Brightness threshold and should be greater than noise level and less than contrast of edges to be preserved. Maps to a command-line argument:
%.10f
(position: 2).- fwhma float
Fwhm of smoothing, in mm, gets converted using sqrt(8*log(2)). Maps to a command-line argument:
%.10f
(position: 3).- in_filea pathlike object or string representing an existing file
Filename of input timeseries. Maps to a command-line argument:
%s
(position: 1).
- argsa string
Additional parameters to the command. Maps to a command-line argument:
%s
.- dimension3 or 2
Within-plane (2) or fully 3D (3). Maps to a command-line argument:
%d
(position: 4). (Nipype default value:3
)- 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
Output file name. Maps to a command-line argument:
%s
(position: -1).- output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’
FSL output type.
- usansa list of at most 2 items which are a tuple of the form: (a pathlike object or string representing an existing file, a float)
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. (Nipype default value:
[]
)- use_median1 or 0
Whether to use a local median filter in the cases where single-point noise is detected. Maps to a command-line argument:
%d
(position: 5). (Nipype default value:1
)
- smoothed_filea pathlike object or string representing an existing file
Smoothed output file.
SliceTimer¶
Bases: FSLCommand
Wrapped executable:
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()
- in_filea pathlike object or string representing an existing file
Filename of input timeseries. Maps to a command-line argument:
--in=%s
(position: 0).
- argsa string
Additional parameters to the command. Maps to a command-line argument:
%s
.- custom_ordera pathlike object or string representing an existing file
Filename of single-column custom interleave order file (first slice is referred to as 1 not 0). Maps to a command-line argument:
--ocustom=%s
.- custom_timingsa pathlike object or string representing an existing file
Slice timings, in fractions of TR, range 0:1 (default is 0.5 = no shift). Maps to a command-line argument:
--tcustom=%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:
{}
)- global_shifta float
Shift in fraction of TR, range 0:1 (default is 0.5 = no shift). Maps to a command-line argument:
--tglobal
.- index_dira boolean
Slice indexing from top to bottom. Maps to a command-line argument:
--down
.- interleaveda boolean
Use interleaved acquisition. Maps to a command-line argument:
--odd
.- out_filea pathlike object or string representing a file
Filename of output timeseries. Maps to a command-line argument:
--out=%s
.- output_type‘NIFTI’ or ‘NIFTI_PAIR’ or ‘NIFTI_GZ’ or ‘NIFTI_PAIR_GZ’
FSL output type.
- slice_direction1 or 2 or 3
Direction of slice acquisition (x=1, y=2, z=3) - default is z. Maps to a command-line argument:
--direction=%d
.- time_repetitiona float
Specify TR of data - default is 3s. Maps to a command-line argument:
--repeat=%f
.
- slice_time_corrected_filea pathlike object or string representing an existing file
Slice time corrected file.