Home · Quickstart · Documentation · Citation · NiPy

# workflows.fmri.fsl.preprocess

## `create_featreg_preproc()`

Link to code

Create a FEAT preprocessing workflow with registration to one volume of the first run

### Parameters

    name : name of workflow (default: featpreproc)
    highpass : boolean (default: True)
    whichvol : which volume of the first run to register to ('first', 'middle', 'mean')

Inputs:

    inputspec.func : functional runs (filename or list of filenames)
    inputspec.fwhm : fwhm for smoothing with SUSAN
    inputspec.highpass : HWHM in TRs (if created with highpass=True)

Outputs:

    outputspec.reference : volume to which runs are realigned
    outputspec.motion_parameters : motion correction parameters
    outputspec.realigned_files : motion corrected files
    outputspec.motion_plots : plots of motion correction parameters
    outputspec.mask : mask file used to mask the brain
    outputspec.smoothed_files : smoothed functional data
    outputspec.highpassed_files : highpassed functional data (if highpass=True)
    outputspec.mean : mean file

### Example

    >>> preproc = create_featreg_preproc()
    >>> preproc.inputs.inputspec.func = ['f3.nii', 'f5.nii']
    >>> preproc.inputs.inputspec.fwhm = 5
    >>> preproc.inputs.inputspec.highpass = 128./(2*2.5)
    >>> preproc.base_dir = '/tmp'
    >>> preproc.run()

    >>> preproc = create_featreg_preproc(highpass=False, whichvol='mean')
    >>> preproc.inputs.inputspec.func = 'f3.nii'
    >>> preproc.inputs.inputspec.fwhm = 5
    >>> preproc.base_dir = '/tmp'
    >>> preproc.run()

### Graph

## `create_fsl_fs_preproc()`

Link to code

Create a FEAT preprocessing workflow together with freesurfer

### Parameters

    name : name of workflow (default: preproc)
    highpass : boolean (default: True)
    whichvol : which volume of the first run to register to ('first', 'middle', 'mean')

Inputs:

    inputspec.func : functional runs (filename or list of filenames)
    inputspec.fwhm : fwhm for smoothing with SUSAN
    inputspec.highpass : HWHM in TRs (if created with highpass=True)
    inputspec.subject_id : freesurfer subject id
    inputspec.subjects_dir : freesurfer subjects dir

Outputs:

    outputspec.reference : volume to which runs are realigned
    outputspec.motion_parameters : motion correction parameters
    outputspec.realigned_files : motion corrected files
    outputspec.motion_plots : plots of motion correction parameters
    outputspec.mask_file : mask file used to mask the brain
    outputspec.smoothed_files : smoothed functional data
    outputspec.highpassed_files : highpassed functional data (if highpass=True)
    outputspec.reg_file : bbregister registration files
    outputspec.reg_cost : bbregister registration cost files

### Example

    >>> preproc = create_fsl_fs_preproc(whichvol='first')
    >>> preproc.inputs.inputspec.highpass = 128./(2*2.5)
    >>> preproc.inputs.inputspec.func = ['f3.nii', 'f5.nii']
    >>> preproc.inputs.inputspec.subjects_dir = '.'
    >>> preproc.inputs.inputspec.subject_id = 's1'
    >>> preproc.inputs.inputspec.fwhm = 6
    >>> preproc.run()

### Graph

## `create_parallelfeat_preproc()`

Link to code

Preprocess each run with FSL independently of the others

### Parameters

    name : name of workflow (default: featpreproc)
    highpass : boolean (default: True)

Inputs:

    inputspec.func : functional runs (filename or list of filenames)
    inputspec.fwhm : fwhm for smoothing with SUSAN
    inputspec.highpass : HWHM in TRs (if created with highpass=True)

Outputs:

    outputspec.reference : volume to which runs are realigned
    outputspec.motion_parameters : motion correction parameters
    outputspec.realigned_files : motion corrected files
    outputspec.motion_plots : plots of motion correction parameters
    outputspec.mask : mask file used to mask the brain
    outputspec.smoothed_files : smoothed functional data
    outputspec.highpassed_files : highpassed functional data (if highpass=True)
    outputspec.mean : mean file

### Example

    >>> preproc = create_parallelfeat_preproc()
    >>> preproc.inputs.inputspec.func = ['f3.nii', 'f5.nii']
    >>> preproc.inputs.inputspec.fwhm = 5
    >>> preproc.inputs.inputspec.highpass = 128./(2*2.5)
    >>> preproc.base_dir = '/tmp'
    >>> preproc.run()

    >>> preproc = create_parallelfeat_preproc(highpass=False)
    >>> preproc.inputs.inputspec.func = 'f3.nii'
    >>> preproc.inputs.inputspec.fwhm = 5
    >>> preproc.base_dir = '/tmp'
    >>> preproc.run()

### Graph

## `create_reg_workflow()`

Link to code

Create a FEAT preprocessing workflow together with freesurfer

### Parameters

    name : name of workflow (default: 'registration')

Inputs:

    inputspec.source_files : files (filename or list of filenames to register)
    inputspec.mean_image : reference image to use
    inputspec.anatomical_image : anatomical image to coregister to
    inputspec.target_image : registration target

Outputs:

    outputspec.func2anat_transform : FLIRT transform
    outputspec.anat2target_transform : FLIRT+FNIRT transform
    outputspec.transformed_files : transformed files in target space
    outputspec.transformed_mean : mean image in target space

### Example

### Graph

## `create_susan_smooth()`

Link to code

Create a SUSAN smoothing workflow

### Parameters

    name : name of workflow (default: susan_smooth)
    separate_masks : separate masks for each run

Inputs:

    inputnode.in_files : functional runs (filename or list of filenames)
    inputnode.fwhm : fwhm for smoothing with SUSAN
    inputnode.mask_file : mask used for estimating SUSAN thresholds (but not for smoothing)

Outputs:

    outputnode.smoothed_files : functional runs (filename or list of filenames)

### Example

    >>> smooth = create_susan_smooth()
    >>> smooth.inputs.inputnode.in_files = 'f3.nii'
    >>> smooth.inputs.inputnode.fwhm = 5
    >>> smooth.inputs.inputnode.mask_file = 'mask.nii'
    >>> smooth.run()

### Graph

## `chooseindex()`

Link to code

## `getbtthresh()`

Link to code

## `getmeanscale()`

Link to code

## `getthreshop()`

Link to code

## `getusans()`

Link to code

## `pickfirst()`

Link to code

## `pickmiddle()`

Link to code

## `pickvol()`

Link to code