NIPY logo

Table Of Contents

Previous topic

interfaces.freesurfer

Next topic

interfaces.io

This Page

interfaces.fsl

Module: interfaces.fsl

Inheritance diagram for nipype.interfaces.fsl:

digraph inheritance4438b7eaca { rankdir=LR; ratio=compress; fontsize=14; size="6.0, 8.0"; "fsl.Bet" [shape=ellipse,URL="#nipype.interfaces.fsl.Bet",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "fsl.FSLCommand" -> "fsl.Bet" [arrowsize=0.5,style="setlinewidth(0.5)"]; "fsl.Flirt" [shape=ellipse,URL="#nipype.interfaces.fsl.Flirt",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "fsl.FSLCommand" -> "fsl.Flirt" [arrowsize=0.5,style="setlinewidth(0.5)"]; "fsl.Level1Design" [shape=ellipse,URL="#nipype.interfaces.fsl.Level1Design",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "base.Interface" -> "fsl.Level1Design" [arrowsize=0.5,style="setlinewidth(0.5)"]; "fsl.McFlirt" [shape=ellipse,URL="#nipype.interfaces.fsl.McFlirt",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "fsl.FSLCommand" -> "fsl.McFlirt" [arrowsize=0.5,style="setlinewidth(0.5)"]; "fsl.FSLSmooth" [shape=ellipse,URL="#nipype.interfaces.fsl.FSLSmooth",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "fsl.FSLCommand" -> "fsl.FSLSmooth" [arrowsize=0.5,style="setlinewidth(0.5)"]; "fsl.L1FSFmaker" [shape=ellipse,URL="#nipype.interfaces.fsl.L1FSFmaker",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "fsl.FSLCommand" [shape=ellipse,URL="#nipype.interfaces.fsl.FSLCommand",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "base.CommandLine" -> "fsl.FSLCommand" [arrowsize=0.5,style="setlinewidth(0.5)"]; "fsl.Fnirt" [shape=ellipse,URL="#nipype.interfaces.fsl.Fnirt",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "fsl.FSLCommand" -> "fsl.Fnirt" [arrowsize=0.5,style="setlinewidth(0.5)"]; "fsl.FSLInfo" [shape=ellipse,URL="#nipype.interfaces.fsl.FSLInfo",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "fsl.ApplyWarp" [shape=ellipse,URL="#nipype.interfaces.fsl.ApplyWarp",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "fsl.FSLCommand" -> "fsl.ApplyWarp" [arrowsize=0.5,style="setlinewidth(0.5)"]; "fsl.Fast" [shape=ellipse,URL="#nipype.interfaces.fsl.Fast",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "fsl.FSLCommand" -> "fsl.Fast" [arrowsize=0.5,style="setlinewidth(0.5)"]; "fsl.ApplyXFM" [shape=ellipse,URL="#nipype.interfaces.fsl.ApplyXFM",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "fsl.Flirt" -> "fsl.ApplyXFM" [arrowsize=0.5,style="setlinewidth(0.5)"]; "base.CommandLine" [shape=ellipse,URL="nipype.interfaces.base.html#nipype.interfaces.base.CommandLine",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "base.Interface" -> "base.CommandLine" [arrowsize=0.5,style="setlinewidth(0.5)"]; "base.Interface" [shape=ellipse,URL="nipype.interfaces.base.html#nipype.interfaces.base.Interface",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; }

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

Currently these tools are supported:

  • BET v2.1: brain extraction
  • FAST v4.1: segmentation and bias correction
  • FLIRT v5.5: linear registration
  • MCFLIRT: motion correction
  • FNIRT v1.0: non-linear warp

Examples

See the docstrings of the individual classes for examples.

Classes

ApplyWarp

class nipype.interfaces.fsl.ApplyWarp(*args, **inputs)

Bases: nipype.interfaces.fsl.FSLCommand

Use FSL’s applywarp to apply the results of a Fnirt registration

Note how little actually needs to be done if we have truly order-independent arguments!

__init__(*args, **inputs)
aggregate_outputs(cwd=None)
cmd
cmdline
validates fsl options and generates command line argument
get_input_info()

Provides information about file inputs to copy or link to cwd.

Notes

see spm.Realign.get_input_info

inputs_help()
Print command line documentation for applywarp.
outputs()

Returns a bunch structure with outputs

Parameters:

(all default to None and are unset) :

outfile

outputs_help()
Print outputs help
run(cwd=None, infile=None, outfile=None, reference=None, fieldfile=None, **inputs)
Interesting point - you can use coeff_files, or fieldfiles interchangeably here

ApplyXFM

class nipype.interfaces.fsl.ApplyXFM(*args, **inputs)

Bases: nipype.interfaces.fsl.Flirt

Use FSL FLIRT to apply a linear transform matrix.

For complete details, see the FLIRT Documentation.

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

Note: This class is currently untested. Use at your own risk!

Examples

>>> from nipype.interfaces import fsl
>>> xfm = ApplyXFM(infile='subject.nii', reference='mni152.nii', bins=640)
>>> xfm_applied = xfm.run(inmatrix='xform.mat')
__init__(*args, **inputs)
aggregate_outputs()

Create a Bunch which contains all possible files generated by running the interface. Some files are always generated, others depending on which inputs options are set.

Returns:

outputs : Bunch object

outfile

Raises:

IOError :

If expected output file(s) outfile or outmatrix are not found.

cmd
sets base command, not editable
cmdline
validates fsl options and generates command line argument
get_input_info()

Provides information about file inputs to copy or link to cwd.

Notes

see spm.Realign.get_input_info

inputs_help()
Print command line documentation for FLIRT.
outputs()

Returns a bunch structure with outputs

Parameters:

(all default to None and are unset) :

outfile : string, filename outmatrix : string, filename

outputs_help()
Print outputs help
run(cwd=None, infile=None, reference=None, inmatrix=None, outfile=None, **inputs)

Run flirt and apply the transformation to the image.

eg. flirt [options] -in <inputvol> -ref <refvol> -applyxfm -init <matrix> -out <outputvol>

Parameters:

infile : string

Filename of volume to be moved.

reference : string

Filename of volume used as target for registration.

inmatrix : string

Filename for input transformation matrix, in ascii format.

outfile : string, optional

Filename of the output, registered volume. If not specified, only the transformation matrix will be calculated.

inputs : dict

Additional inputs assignments.

Returns:

results : InterfaceResult

An nipype.interfaces.base.InterfaceResult object with a copy of self in interface

Examples

>>> from nipype.interfaces import fsl
>>> flt = fsl.Flirt(infile='subject.nii', reference='template.nii')
>>> xformed = flt.run(inmatrix='xform.mat', outfile='xfm_subject.nii')

Bet

class nipype.interfaces.fsl.Bet(*args, **inputs)

Bases: nipype.interfaces.fsl.FSLCommand

Use FSL BET command for skull stripping.

For complete details, see the BET Documentation.

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

Examples

Initialize Bet with no options, assigning them when calling run:

>>> from nipype.interfaces import fsl
>>> btr = fsl.Bet()
>>> res = btr.run('infile', 'outfile', frac=0.5) # doctest: +SKIP

Assign options through the inputs attribute:

>>> btr = fsl.Bet()
>>> btr.inputs.infile = 'foo.nii'
>>> btr.inputs.outfile = 'bar.nii'
>>> btr.inputs.frac = 0.7
>>> res = btr.run() # doctest: +SKIP

Specify options when creating a Bet instance:

>>> btr = fsl.Bet(infile='infile', outfile='outfile', frac=0.5)
>>> res = btr.run() # doctest: +SKIP

Loop over many inputs (Note: the snippet below would overwrite the outfile each time):

>>> btr = fsl.Bet(infile='infile', outfile='outfile')
>>> fracvals = [0.3, 0.4, 0.5]
>>> for val in fracvals:
...     res = btr.run(frac=val) # doctest: +SKIP
__init__(*args, **inputs)
aggregate_outputs(cwd=None)

Create a Bunch which contains all possible files generated by running the interface. Some files are always generated, others depending on which inputs options are set.

Parameters:

cwd : /path/to/outfiles

Where do we look for the outputs? None means look in same location as infile

Returns :

——- :

outputs : Bunch object

Bunch object containing all possible files generated by interface object.

If None, file was not generated Else, contains path, filename of generated outputfile

cmd
sets base command, immutable
cmdline
validates fsl options and generates command line argument
get_input_info()

Provides information about file inputs to copy or link to cwd.

Notes

see spm.Realign.get_input_info

inputs_help()
Print command line documentation for Bet.
outputs()

Returns a bunch structure with outputs

Parameters:

(all default to None and are unset) :

outfile : string,file

path/name of skullstripped file

maskfile : string, file

binary brain mask if generated

outputs_help()
Print outputs help
run(cwd=None, infile=None, outfile=None, **inputs)

Execute the command.

Parameters:

infile : string

Filename to be skull stripped.

outfile : string, optional

Filename to save output to. If not specified, the infile filename will be used with a “_bet” suffix.

inputs : dict

Additional inputs assignments can be passed in. See Examples section.

Returns:

results : InterfaceResult

An nipype.interfaces.base.InterfaceResult object with a copy of self in interface

Examples

To pass command line arguments to bet that are not part of the inputs attribute, pass them in with the flags input.

>>> from nipype.interfaces import fsl
>>> btr = fsl.Bet(infile='foo.nii', outfile='bar.nii', flags='-v')
>>> btr.cmdline
'bet foo.nii bar.nii -v'

FSLCommand

class nipype.interfaces.fsl.FSLCommand(*args, **inputs)

Bases: nipype.interfaces.base.CommandLine

General support for FSL commands

__init__(*args, **inputs)
aggregate_outputs()
cmdline
validates fsl options and generates command line argument
get_input_info()

Provides information about file inputs to copy or link to cwd.

Notes

see spm.Realign.get_input_info

inputs_help()
Print command line documentation for the command.
outputs()
outputs_help()
Print outputs help
run(cwd=None)

Execute the command.

Returns:

results : InterfaceResult

An nipype.interfaces.base.InterfaceResult object with a copy of self in interface

FSLInfo

class nipype.interfaces.fsl.FSLInfo

Bases: object

A class to encapsulate stuff we’ll need throughout the

This should probably be a singleton class? or do we want to make it possible to wrap a few versions of FSL? In any case, currently we instantiate an instance here called fsl_info

I’m also not sure this is the best ordering for the various attributes and methods. Please feel free to reorder.

__init__()
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
gen_fname(basename, fname=None, cwd=None, suffix='_fsl', check=False)

Define a generic mapping for a single outfile

The filename is potentially autogenerated by suffixing inputs.infile

Parameters:

basename : string (required)

filename to base the new filename on

fname : string

if not None, just use this fname

cwd : string

prefix paths with cwd, otherwise os.getcwd()

suffix : string

default suffix

check : bool

check if file exists, adding appropriate extension, raise exception if it doesn’t

glob(fname)

Check if, given a filename, FSL actually produced it.

The maing thing we’re doing here is adding an appropriate extension while globbing. Note that it returns a single string, not a list (different from glob.glob)

outputtype(ftype=None)

Check and or set the global FSL output file type FSLOUTPUTTYPE

Parameters:

ftype : string

Represents the file type to set based on string of valid FSL file types ftype == None to get current setting/ options

Returns:

fsl_ftype : string

Represents the current environment setting of FSLOUTPUTTYPE

ext : string

The extension associated with the FSLOUTPUTTYPE

standard_image(img_name)

Grab an image from the standard location.

Could be made more fancy to allow for more relocatability

version

Check for fsl version on system

Parameters:

None :

Returns:

version : string

Version number as string or None if FSL not found

FSLSmooth

class nipype.interfaces.fsl.FSLSmooth(*args, **inputs)

Bases: nipype.interfaces.fsl.FSLCommand

Use fslmaths to smooth the image

This is dumb, of course - we should use nipy for such things! But it is a step along the way to get the “standard” FSL pipeline in place.

This is meant to be a throwaway class, so it’s not currently very robust. Effort would be better spent integrating basic numpy into nipype

__init__(*args, **inputs)
aggregate_outputs(cwd=None)
cmd
cmdline
validates fsl options and generates command line argument
get_input_info()

Provides information about file inputs to copy or link to cwd.

Notes

see spm.Realign.get_input_info

inputs_help()
Print command line documentation for the command.
outputs()

Returns a bunch structure with outputs

Parameters:

(all default to None and are unset) :

smoothedimage

outputs_help()
Print outputs help
run(cwd=None)

Execute the command.

Returns:

results : InterfaceResult

An nipype.interfaces.base.InterfaceResult object with a copy of self in interface

Fast

class nipype.interfaces.fsl.Fast(*args, **inputs)

Bases: nipype.interfaces.fsl.FSLCommand

Use FSL FAST for segmenting and bias correction.

For complete details, see the FAST Documentation.

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

Examples

>>> from nipype.interfaces import fsl
>>> faster = fsl.Fast(out_basename='myfasted')
>>> fasted = faster.run(['file1','file2'])
>>> faster = fsl.Fast(infiles=['filea','fileb'], out_basename='myfasted')
>>> fasted = faster.run()
__init__(*args, **inputs)
aggregate_outputs()

Create a Bunch which contains all possible files generated by running the interface. Some files are always generated, others depending on which inputs options are set.

Returns:

outputs : Bunch object

Raises:

IOError :

If any expected output file is not found.

Notes

For each item in Bunch: If [] empty list, optional file was not generated Else, list contains path,filename of generated outputfile(s)

cmd
sets base command, not editable
cmdline
validates fsl options and generates command line argument
get_input_info()

Provides information about file inputs to copy or link to cwd.

Notes

see spm.Realign.get_input_info

inputs_help()
Print command line documentation for FAST.
outputs()

Returns a bunch structure with outputs

Parameters:

(all default to None and are unset) :

Each attribute in outputs is a list. There will be one set of outputs for each file specified in infiles. outputs will contain the following files:

mixeltype : list

filename(s)

partial_volume_map : list

filenames, one for each input

partial_volume_files : list

filenames, one for each class, for each input

tissue_class_map : list

filename(s), each tissue has unique int value

tissue_class_files : list

filenames, one for each class, for each input

restored_image : list

filename(s) bias corrected image(s)

bias_field : list

filename(s)

probability_maps : list

filenames, one for each class, for each input

outputs_help()
Print outputs help
run(infiles=None, **inputs)

Execute the FSL fast command.

Parameters:

infiles : string or list of strings

File(s) to be segmented or bias corrected

inputs : dict

Additional inputs assignments can be passed in.

Returns:

results : InterfaceResult

An nipype.interfaces.base.InterfaceResult object with a copy of self in interface

Flirt

class nipype.interfaces.fsl.Flirt(*args, **inputs)

Bases: nipype.interfaces.fsl.FSLCommand

Use FSL FLIRT 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
>>> flt = fsl.Flirt(bins=640, searchcost='mutualinfo')
>>> flt.inputs.infile = 'subject.nii'
>>> flt.inputs.reference = 'template.nii'
>>> flt.inputs.outfile = 'moved_subject.nii'
>>> flt.inputs.outmatrix = 'subject_to_template.mat'
>>> res = flt.run()
__init__(*args, **inputs)
aggregate_outputs(cwd=None)

Create a Bunch which contains all possible files generated by running the interface. Some files are always generated, others depending on which inputs options are set.

Returns:

outputs : Bunch object

outfile outmatrix

Raises:

IOError :

If expected output file(s) outfile or outmatrix are not found.

cmd
sets base command, not editable
cmdline
validates fsl options and generates command line argument
get_input_info()

Provides information about file inputs to copy or link to cwd.

Notes

see spm.Realign.get_input_info

inputs_help()
Print command line documentation for FLIRT.
outputs()

Returns a bunch containing output parameters

Parameters:

outfile : string, file

outmatrix : string, file

outputs_help()
Print outputs help
run(cwd=None, infile=None, reference=None, outfile=None, outmatrix=None, **inputs)

Run the flirt command

Parameters:

infile : string

Filename of volume to be moved.

reference : string

Filename of volume used as target for registration.

outfile : string, optional

Filename of the output, registered volume. If not specified, only the transformation matrix will be calculated.

outmatrix : string, optional

Filename to output transformation matrix in asci format. If not specified, the output matrix will not be saved to a file.

inputs : dict

Additional inputs assignments.

Returns:

results : InterfaceResult

An nipype.interfaces.base.InterfaceResult object with a copy of self in interface

Fnirt

class nipype.interfaces.fsl.Fnirt(*args, **inputs)

Bases: nipype.interfaces.fsl.FSLCommand

Use FSL FNIRT for non-linear registration.

For complete details, see the FNIRT Documentation.

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

Examples

>>> from nipype.interfaces import fsl
>>> fnt = fsl.Fnirt(affine='affine.mat')
>>> res = fnt.run(reference='ref.nii', infile='anat.nii') # doctests: +SKIP
__init__(*args, **inputs)
aggregate_outputs(cwd=None)

Create a Bunch which contains all possible files generated by running the interface. Some files are always generated, others depending on which inputs options are set.

Returns:

outputs : Bunch object

Raises:

IOError :

If the output file is not found.

Notes

For each item in the outputs, if it’s value is None then the optional file was not generated. Otherwise it contains the path/filename of generated output file(s).

cmd
sets base command, not editable
cmdline
validates fsl options and generates command line argument
get_input_info()

Provides information about file inputs to copy or link to cwd.

Notes

see spm.Realign.get_input_info

inputs_help()
Print command line documentation for FNIRT.
outputs()

Returns a bunch structure with outputs

Parameters:

fieldcoeff_file :

warpedimage :

fieldfile :

jacobianfield :

modulatedreference :

intensitymodulation :

logfile :

outputs_help()
Print outputs help
run(cwd=None, infile=None, reference=None, **inputs)

Run the fnirt command

Note: technically, only one of infile OR reference need be specified.

You almost certainly want to start with a config file, such as T1_2_MNI152_2mm

Parameters:

infile : string

Filename of the volume to be warped/moved.

reference : string

Filename of volume used as target for warp registration.

inputs : dict

Additional inputs assignments.

Returns:

results : InterfaceResult

An nipype.interfaces.base.InterfaceResult object with a copy of self in interface

Examples

T1 -> Mni153

>>> from nipype.interfaces import fsl
>>> fnirt_mprage = fsl.Fnirt()
>>> fnirt_mprage.inputs.imgfwhm = [8, 4, 2]
>>> fnirt_mprage.inputs.sub_sampling = [4, 2, 1]

Specify the resolution of the warps, currently not part of the fnirt_mprage.inputs:

>>> fnirt_mprage.inputs.flags = '--warpres 6, 6, 6'
>>> res = fnirt_mprage.run(infile='subj.nii', reference='mni.nii')

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

>>> fnirt_mprage.cmdline  #doctest: +NORMALIZE_WHITESPACE
'fnirt --warpres 6, 6, 6 --infwhm=8,4,2 --in=subj.nii 
    --ref=mni.nii --subsamp=4,2,1'
write_config(configfile)

Writes out currently set options to specified config file

Parameters:configfile : /path/to/configfile

L1FSFmaker

class nipype.interfaces.fsl.L1FSFmaker(**inputs)

Bases: object

Use the template variables above to construct fsf files for feat.

This doesn’t actually run anything, it just creates the .fsf files.

Examples

Need to put a good example here. See opt_list for a list of acceptable inputs.

Note that we currently do stats + post-stats. This is partly determined by the do_contrasts string substitutions below, and partly by the “6” in the feat_header.tcl.

__init__(**inputs)
aggregate_outputs()
gen_contrasts(sorted_conds)
gen_ev(cond_num, cond_name, cond_file, total_conds, temporalderiv=False)
run(cwd=None, **inputs)

Level1Design

class nipype.interfaces.fsl.Level1Design(*args, **inputs)

Bases: nipype.interfaces.base.Interface

Generate Feat specific files

See Level1Design().inputs_help() for more information.

Parameters:

inputs : mapping

key, value pairs that will update the Level1Design.inputs attributes :

see self.inputs_help() for a list of Level1Design.inputs attributes :

Attributes:

inputs : Bunch

a (dictionary-like) bunch of options that can be passed to :

spm_smooth via a job structure :

cmdline : string

string used to call matlab/spm via SpmMatlabCommandLine interface :

__init__(*args, **inputs)
aggregate_outputs()
cmd
get_input_info()
Provides information about inputs as a dict info = [Bunch(key=string,copy=bool,ext=’.nii’),...]
inputs_help()
Parameters:

interscan_interval : float (in secs)

Interscan interval, TR.

session_info : list of dicts

Stores session specific information

Session parameters

nscan : int

Number of scans in a session

scans : list of filenames

A single 4D nifti file or a list of 3D nifti files

hpf : float

High pass filter cutoff SPM default = 128 secs

condition_info : mat filename or list of dicts

The output of Specify>odel generates this information.

regressor_info : mat/txt filename or list of dicts

Stores regressor specific information The output of Specify>odel generates this information.

bases : dict {‘name’:{‘basesparam1’:val,...}}

name : string

Name of basis function (hrf, fourier, fourier_han, gamma, fir)

hrf :
derivs : boolean

Model HRF Derivatives.

fourier, fourier_han, gamma, fir:
length : int

Post-stimulus window length (in seconds)

order : int

Number of basis functions

model_serial_correlations : string

Option to model serial correlations using an autoregressive estimator. AR(1) or none SPM default = AR(1)

contrasts : list of dicts

List of contrasts with each list containing: ‘name’, ‘stat’, [condition list], [weight list].

outputs()

Returns a bunch structure with outputs

Parameters:

(all default to None and are unset) :

fsf_files:

FSL feat specification files

ev_files:

condition information files

outputs_help()
run(cwd=None, **inputs)

McFlirt

class nipype.interfaces.fsl.McFlirt(*args, **inputs)

Bases: nipype.interfaces.fsl.FSLCommand

Use FSL MCFLIRT to do within-modality motion correction.

For complete details, see the MCFLIRT Documentation.

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

Examples

>>> from nipype.interfaces import fsl
>>> mcflt = fsl.McFlirt(infile='timeseries.nii', cost='mututalinfo')
>>> res = mcflt.run()
__init__(*args, **inputs)
aggregate_outputs(cwd=None)
cmd
sets base command, not editable
cmdline
validates fsl options and generates command line argument
get_input_info()

Provides information about file inputs to copy or link to cwd.

Notes

see spm.Realign.get_input_info

inputs_help()
Print command line documentation for MCFLIRT.
outputs()

Returns a bunch structure with outputs

Parameters:

(all default to None and are unset) :

outfile : string, filename varianceimg : string, filename stdimg : string, filename meanimg : string, filename parfile : string, filename outmatfile : string, filename

outputs_help()
Print outputs help
run(cwd=None, infile=None, **inputs)

Runs mcflirt

Parameters:

cwd : string

currently ignored

infile : string

Filename of volume to be aligned

inputs : dict

Additional inputs assignments.

Returns:

results : InterfaceResult

An nipype.interfaces.base.InterfaceResult object with a copy of self in interface

Examples

>>> from nipype.interfaces import fsl
>>> mcflrt = fsl.McFlirt(cost='mutualinfo')
>>> mcflrtd = mcflrt.run(infile='timeseries.nii')

Functions

nipype.interfaces.fsl.fsloutputtype(ftype=None)
nipype.interfaces.fsl.fslversion()