@@ -129,13 +129,17 @@ def _format_arg(self, name, trait_spec, value):
129129
130130
131131class MergeInputSpec (FSLCommandInputSpec ):
132- in_files = traits .List (File (exists = True ), argstr = "%s" , position = 2 , mandatory = True )
132+ in_files = traits .List (File (exists = True ), argstr = "%s" , position = 2 ,
133+ mandatory = True )
133134 dimension = traits .Enum ('t' , 'x' , 'y' , 'z' , 'a' , argstr = "-%s" , position = 0 ,
134- desc = "dimension along which to merge, optionally set tr input when dimension is t" ,
135+ desc = ("dimension along which to merge, optionally "
136+ "set tr input when dimension is t" ),
135137 mandatory = True )
136138 tr = traits .Float (position = - 1 , argstr = '%.2f' ,
137- desc = 'use to specify TR in seconds (default is 1.00 sec), overrides dimension and sets it to tr' )
138- merged_file = File (argstr = "%s" , position = 1 , name_source = 'in_files' , name_template = '%s_merged' , hash_files = False )
139+ desc = ('use to specify TR in seconds (default is 1.00 '
140+ 'sec), overrides dimension and sets it to tr' ))
141+ merged_file = File (argstr = "%s" , position = 1 , name_source = 'in_files' ,
142+ name_template = '%s_merged' , hash_files = False )
139143
140144
141145class MergeOutputSpec (TraitedSpec ):
@@ -145,26 +149,25 @@ class MergeOutputSpec(TraitedSpec):
145149class Merge (FSLCommand ):
146150 """Use fslmerge to concatenate images
147151
148- Images can be concatenated across time, x, y, or z dimensions. Across the time (t)
149- dimension the TR is set by default to 1 sec.
152+ Images can be concatenated across time, x, y, or z dimensions. Across the
153+ time (t) dimension the TR is set by default to 1 sec.
150154
151- Note: to set the TR to a different value, specify 't' for dimension and specify
152- the TR value in seconds for the tr input. The dimension will be automatically
153- updated to 'tr'.
155+ Note: to set the TR to a different value, specify 't' for dimension and
156+ specify the TR value in seconds for the tr input. The dimension will be
157+ automatically updated to 'tr'.
154158
155159 Examples
156160 --------
157161 >>> from nipype.interfaces.fsl import Merge
158- >>> from nipype.testing import funcfile
159162 >>> merger = Merge()
160- >>> merger.inputs.in_files = ['functional .nii', 'functional .nii']
163+ >>> merger.inputs.in_files = ['functional2 .nii', 'functional3 .nii']
161164 >>> merger.inputs.dimension = 't'
162- >>> merger.inputs.merged_file = "functional_merged.nii.gz"
165+ >>> merger.inputs.output_type = 'NIFTI_GZ'
163166 >>> merger.cmdline
164- 'fslmerge -t functional_merged .nii.gz functional .nii functional .nii'
167+ 'fslmerge -t functional2_merged .nii.gz functional2 .nii functional3 .nii'
165168 >>> merger.inputs.tr = 2.25
166169 >>> merger.cmdline
167- 'fslmerge -tr functional_merged .nii.gz functional .nii functional .nii 2.25'
170+ 'fslmerge -tr functional2_merged .nii.gz functional2 .nii functional3 .nii 2.25'
168171 """
169172
170173 _cmd = 'fslmerge'
0 commit comments