cmtklib.interfaces.afni module¶
The AFNI module provides Nipype interfaces for the AFNI toolbox missing in nipype or modified.
Bandpass¶
Bases: nipype.interfaces.afni.base.AFNICommand
Wrapped executable:
3dBandpass
.Program to lowpass and/or highpass each voxel time series in a dataset.
Calls the
3dBandpass
tool from AFNI, offering more/different options than FourierFor complete details, see the 3dBandpass Documentation.
Examples
>>> from nipype.interfaces import afni as afni >>> from nipype.testing import example_data >>> bandpass = afni.Bandpass() >>> bandpass.inputs.in_file = example_data('functional.nii') >>> bandpass.inputs.highpass = 0.005 >>> bandpass.inputs.lowpass = 0.1 >>> res = bandpass.run()
- highpassa float
Highpass. Maps to a command-line argument:
%f
(position: -3).- in_filea pathlike object or string representing an existing file
Input file to 3dBandpass. Maps to a command-line argument:
%s
(position: -1).- lowpassa float
Lowpass. Maps to a command-line argument:
%f
(position: -2).
- argsa string
Additional parameters to the command. Maps to a command-line argument:
%s
.- automaska boolean
Create a mask from the input dataset. Maps to a command-line argument:
-automask
.- blura float
- Blur (inside the mask only) with a filter
width (FWHM) of ‘fff’ millimeters.
Maps to a command-line argument:
-blur %f
.- despikea boolean
- Despike each time series before other processing.
- ++ Hopefully, you don’t actually need to do this,
which is why it is optional.
Maps to a command-line argument:
-despike
.- 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:
{}
)- localPVa float
- Replace each vector by the local Principal Vector
(AKA first singular vector) from a neighborhood of radius ‘rrr’ millimiters.
++ Note that the PV time series is L2 normalized. ++ This option is mostly for Bob Cox to have fun with.
Maps to a command-line argument:
-localPV %f
.- maska pathlike object or string representing an existing file
Mask file. Maps to a command-line argument:
-mask %s
(position: 2).- nfftan integer
Set the FFT length [must be a legal value]. Maps to a command-line argument:
-nfft %d
.- no_detrenda boolean
- Skip the quadratic detrending of the input that
occurs before the FFT-based bandpassing.
- ++ You would only want to do this if the dataset
had been detrended already in some other program.
Maps to a command-line argument:
-nodetrend
.- normalizea boolean
- Make all output time series have L2 norm = 1
++ i.e., sum of squares = 1.
Maps to a command-line argument:
-norm
.- notransa boolean
- Don’t check for initial positive transients in the data:
++ The test is a little slow, so skipping it is OK, if you KNOW the data time series are transient-free.
Maps to a command-line argument:
-notrans
.- num_threadsan integer
Set number of threads. (Nipype default value:
1
)- orthogonalize_dseta pathlike object or string representing an existing file
- Orthogonalize each voxel to the corresponding
voxel time series in dataset ‘fset’, which must have the same spatial and temporal grid structure as the main input dataset. ++ At present, only one ‘-dsort’ option is allowed.
Maps to a command-line argument:
-dsort %s
.- orthogonalize_filea list of items which are a pathlike object or string representing an existing file
- Also orthogonalize input to columns in f.1D
++ Multiple ‘-ort’ options are allowed.
Maps to a command-line argument:
-ort %s
.- out_filea pathlike object or string representing a file
Output file from 3dBandpass. Maps to a command-line argument:
-prefix %s
(position: 1).- outputtype‘NIFTI’ or ‘AFNI’ or ‘NIFTI_GZ’
AFNI output filetype.
- tra float
Set time step (TR) in sec [default=from dataset header]. Maps to a command-line argument:
-dt %f
.
- out_filea pathlike object or string representing an existing file
Output file.
Despike¶
Bases: nipype.interfaces.afni.base.AFNICommand
Wrapped executable:
3dDespike
.Removes ‘spikes’ from the 3D+time input dataset.
It calls the
3dDespike
tool from AFNI.For complete details, see the 3dDespike Documentation.
Examples
>>> from nipype.interfaces import afni >>> despike = afni.Despike() >>> despike.inputs.in_file = 'functional.nii' >>> despike.cmdline '3dDespike -prefix functional_despike functional.nii' >>> res = despike.run()
- in_filea pathlike object or string representing an existing file
Input file to 3dDespike. Maps to a command-line argument:
%s
(position: -1).
- argsa string
Additional parameters to the command. Maps to a command-line argument:
%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:
{}
)- num_threadsan integer
Set number of threads. (Nipype default value:
1
)- out_filea pathlike object or string representing a file
Output image file name. Maps to a command-line argument:
-prefix %s
.- outputtype‘NIFTI’ or ‘AFNI’ or ‘NIFTI_GZ’
AFNI output filetype.
- out_filea pathlike object or string representing an existing file
Output file.