interfaces.workbench.cifti

CiftiSmooth

Link to code

Wraps the executable command wb_command -cifti-smoothing.

Smooth a CIFTI file

The input cifti file must have a brain models mapping on the chosen dimension, columns for .dtseries, and either for .dconn. By default, data in different structures is smoothed independently (i.e., “parcel constrained” smoothing), so volume structures that touch do not smooth across this boundary. Specify merged_volume to ignore these boundaries. Surface smoothing uses the GEO_GAUSS_AREA smoothing method.

The *_corrected_areas options are intended for when it is unavoidable to smooth on group average surfaces, it is only an approximate correction for the reduction of structure in a group average surface. It is better to smooth the data on individuals before averaging, when feasible.

The fix_zeros_* options will treat values of zero as lack of data, and not use that value when generating the smoothed values, but will fill zeros with extrapolated values. The ROI should have a brain models mapping along columns, exactly matching the mapping of the chosen direction in the input file. Data outside the ROI is ignored.

>>> from nipype.interfaces.workbench import CiftiSmooth
>>> smooth = CiftiSmooth()
>>> smooth.inputs.in_file = 'sub-01_task-rest.dtseries.nii'
>>> smooth.inputs.sigma_surf = 4
>>> smooth.inputs.sigma_vol = 4
>>> smooth.inputs.direction = 'COLUMN'
>>> smooth.inputs.right_surf = 'sub-01.R.midthickness.32k_fs_LR.surf.gii'
>>> smooth.inputs.left_surf = 'sub-01.L.midthickness.32k_fs_LR.surf.gii'
>>> smooth.cmdline
'wb_command -cifti-smoothing sub-01_task-rest.dtseries.nii 4.0 4.0 COLUMN     smoothed_sub-01_task-rest.dtseries.nii     -left-surface sub-01.L.midthickness.32k_fs_LR.surf.gii     -right-surface sub-01.R.midthickness.32k_fs_LR.surf.gii'

Inputs:

[Mandatory]
in_file: (an existing file name)
        The input CIFTI file
        argument: ``%s``, position: 0
sigma_surf: (a float)
        the sigma for the gaussian surface smoothing kernel, in mm
        argument: ``%s``, position: 1
sigma_vol: (a float)
        the sigma for the gaussian volume smoothing kernel, in mm
        argument: ``%s``, position: 2
direction: ('ROW' or 'COLUMN')
        which dimension to smooth along, ROW or COLUMN
        argument: ``%s``, position: 3
left_surf: (an existing file name)
        Specify the left surface to use
        argument: ``-left-surface %s``, position: 5
right_surf: (an existing file name)
        Specify the right surface to use
        argument: ``-right-surface %s``, position: 7

[Optional]
out_file: (a file name)
        The output CIFTI
        argument: ``%s``, position: 4
left_corrected_areas: (an existing file name)
        vertex areas (as a metric) to use instead of computing them from the
        left surface.
        argument: ``-left-corrected-areas %s``, position: 6
right_corrected_areas: (an existing file name)
        vertex areas (as a metric) to use instead of computing them from the
        right surface
        argument: ``-right-corrected-areas %s``, position: 8
cerebellum_surf: (an existing file name)
        specify the cerebellum surface to use
        argument: ``-cerebellum-surface %s``, position: 9
cerebellum_corrected_areas: (an existing file name)
        vertex areas (as a metric) to use instead of computing them from the
        cerebellum surface
        argument: ``cerebellum-corrected-areas %s``, position: 10
        requires: cerebellum_surf
cifti_roi: (an existing file name)
        CIFTI file for ROI smoothing
        argument: ``-cifti-roi %s``, position: 11
fix_zeros_vol: (a boolean)
        treat values of zero in the volume as missing data
        argument: ``-fix-zeros-volume``, position: 12
fix_zeros_surf: (a boolean)
        treat values of zero on the surface as missing data
        argument: ``-fix-zeros-surface``, position: 13
merged_volume: (a boolean)
        smooth across subcortical structure boundaries
        argument: ``-merged-volume``, position: 14
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: (an existing file name)
        output CIFTI file