@@ -2853,6 +2853,79 @@ def _list_outputs(self):
28532853 return outputs
28542854
28552855
2856+ class TSmoothInputSpec (AFNICommandInputSpec ):
2857+ in_file = File (
2858+ desc = 'input file to 3dTSmooth' ,
2859+ argstr = '%s' ,
2860+ position = - 1 ,
2861+ mandatory = True ,
2862+ exists = True ,
2863+ copyfile = False )
2864+ out_file = File (
2865+ name_template = '%s_smooth' ,
2866+ desc = 'output file from 3dTSmooth' ,
2867+ argstr = '-prefix %s' ,
2868+ name_source = 'in_file' )
2869+ datum = traits .Str (
2870+ desc = 'Sets the data type of the output dataset' ,
2871+ argstr = '-datum %s' )
2872+ lin = traits .Bool (
2873+ desc = '3 point linear filter: 0.15*a + 0.70*b + 0.15*c'
2874+ '[This is the default smoother]' ,
2875+ argstr = '-lin' )
2876+ med = traits .Bool (
2877+ desc = '3 point median filter: median(a,b,c)' ,
2878+ argstr = '-med' )
2879+ osf = traits .Bool (
2880+ desc = '3 point order statistics filter:'
2881+ '0.15*min(a,b,c) + 0.70*median(a,b,c) + 0.15*max(a,b,c)' ,
2882+ argstr = '-osf' )
2883+ lin3 = traits .Int (
2884+ desc = '3 point linear filter: 0.5*(1-m)*a + m*b + 0.5*(1-m)*c'
2885+ "Here, 'm' is a number strictly between 0 and 1." ,
2886+ argstr = '-3lin %d' )
2887+ hamming = traits .Int (
2888+ argstr = '-hamming %d' ,
2889+ desc = 'Use N point Hamming windows.'
2890+ '(N must be odd and bigger than 1.)' )
2891+ blackman = traits .Int (
2892+ argstr = '-blackman %d' ,
2893+ desc = 'Use N point Blackman windows.'
2894+ '(N must be odd and bigger than 1.)' )
2895+ custom = File (
2896+ argstr = '-custom %s' ,
2897+ desc = 'odd # of coefficients must be in a single column in ASCII file' )
2898+ adaptive = traits .Int (
2899+ argstr = '-adaptive %d' ,
2900+ desc = 'use adaptive mean filtering of width N '
2901+ '(where N must be odd and bigger than 3).' )
2902+
2903+
2904+ class TSmooth (AFNICommand ):
2905+ """Smooths each voxel time series in a 3D+time dataset and produces
2906+ as output a new 3D+time dataset (e.g., lowpass filter in time).
2907+
2908+ For complete details, see the `3dTsmooth Documentation.
2909+ <https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dTSmooth.html>`_
2910+
2911+ Examples
2912+ ========
2913+
2914+ >>> from nipype.interfaces import afni
2915+ >>> from nipype.testing import example_data
2916+ >>> smooth = afni.TSmooth()
2917+ >>> smooth.inputs.in_file = 'functional.nii'
2918+ >>> smooth.inputs.adaptive = 5
2919+ >>> smooth.cmdline
2920+ '3dTsmooth -adaptive 5 -prefix functional_smooth functional.nii'
2921+ >>> res = smooth.run() # doctest: +SKIP
2922+
2923+ """
2924+ _cmd = '3dTsmooth'
2925+ input_spec = TSmoothInputSpec
2926+ output_spec = AFNICommandOutputSpec
2927+
2928+
28562929class VolregInputSpec (AFNICommandInputSpec ):
28572930 in_file = File (
28582931 desc = 'input file to 3dvolreg' ,
0 commit comments