@@ -129,13 +129,17 @@ def _format_arg(self, name, trait_spec, value):
129
129
130
130
131
131
class 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 )
133
134
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" ),
135
137
mandatory = True )
136
138
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 )
139
143
140
144
141
145
class MergeOutputSpec (TraitedSpec ):
@@ -145,26 +149,25 @@ class MergeOutputSpec(TraitedSpec):
145
149
class Merge (FSLCommand ):
146
150
"""Use fslmerge to concatenate images
147
151
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.
150
154
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'.
154
158
155
159
Examples
156
160
--------
157
161
>>> from nipype.interfaces.fsl import Merge
158
- >>> from nipype.testing import funcfile
159
162
>>> merger = Merge()
160
- >>> merger.inputs.in_files = ['functional .nii', 'functional .nii']
163
+ >>> merger.inputs.in_files = ['functional2 .nii', 'functional3 .nii']
161
164
>>> merger.inputs.dimension = 't'
162
- >>> merger.inputs.merged_file = "functional_merged.nii.gz"
165
+ >>> merger.inputs.output_type = 'NIFTI_GZ'
163
166
>>> merger.cmdline
164
- 'fslmerge -t functional_merged .nii.gz functional .nii functional .nii'
167
+ 'fslmerge -t functional2_merged .nii.gz functional2 .nii functional3 .nii'
165
168
>>> merger.inputs.tr = 2.25
166
169
>>> 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'
168
171
"""
169
172
170
173
_cmd = 'fslmerge'
0 commit comments