@@ -1206,7 +1206,7 @@ class TCatInputSpec(AFNICommandInputSpec):
1206
1206
mandatory = True ,
1207
1207
copyfile = False )
1208
1208
out_file = File (name_template = "%s_tcat" , desc = 'output image file name' ,
1209
- argstr = '-prefix %s' , name_source = "in_file " )
1209
+ argstr = '-prefix %s' , name_source = "in_files " )
1210
1210
rlt = traits .Str (desc = 'options' , argstr = '-rlt%s' , position = 1 )
1211
1211
1212
1212
@@ -1993,3 +1993,46 @@ def _parse_inputs(self, skip=None):
1993
1993
"""
1994
1994
return super (Eval , self )._parse_inputs (
1995
1995
skip = ('start_idx' , 'stop_idx' , 'out1D' , 'other' ))
1996
+
1997
+ class MeansInputSpec (AFNICommandInputSpec ):
1998
+ in_file_a = File (desc = 'input file to 3dMean' ,
1999
+ argstr = '%s' ,
2000
+ position = 0 ,
2001
+ mandatory = True ,
2002
+ exists = True )
2003
+ in_file_b = File (desc = 'another input file to 3dMean' ,
2004
+ argstr = '%s' ,
2005
+ position = 1 ,
2006
+ exists = True )
2007
+ out_file = File (name_template = "%s_mean" , desc = 'output image file name' ,
2008
+ argstr = '-prefix %s' , name_source = "in_file_a" )
2009
+ scale = traits .Str (desc = 'scaling of output' , argstr = '-%sscale' )
2010
+ non_zero = traits .Bool (desc = 'use only non-zero values' , argstr = '-non_zero' )
2011
+ std_dev = traits .Bool (desc = 'calculate std dev' , argstr = '-stdev' )
2012
+ sqr = traits .Bool (desc = 'mean square instead of value' , argstr = '-sqr' )
2013
+ summ = traits .Bool (desc = 'take sum, (not average)' , argstr = '-sum' )
2014
+ count = traits .Bool (desc = 'compute count of non-zero voxels' , argstr = '-count' )
2015
+ mask_inter = traits .Bool (desc = 'create intersection mask' , argstr = '-mask_inter' )
2016
+ mask_union = traits .Bool (desc = 'create union mask' , argstr = '-mask_union' )
2017
+
2018
+ class Means (AFNICommand ):
2019
+ """Takes the voxel-by-voxel mean of all input datasets using 3dMean
2020
+
2021
+ see AFNI Documentation: <http://afni.nimh.nih.gov/pub/dist/doc/program_help/3dMean.html>
2022
+
2023
+ Examples
2024
+ ========
2025
+
2026
+ >>> from nipype.interfaces import afni as afni
2027
+ >>> means = afni.Means()
2028
+ >>> means.inputs.in_file_a = 'dset.nii'
2029
+ >>> means.inputs.in_file_b = 'dset2.nii'
2030
+ >>> means.inputs.out_file = 'output.nii'
2031
+ >>> means.cmdline
2032
+ '3dMean -prefix output.nii dset.nii'
2033
+
2034
+ """
2035
+
2036
+ _cmd = '3dMean'
2037
+ input_spec = MeansInputSpec
2038
+ output_spec = AFNICommandOutputSpec
0 commit comments