@@ -115,7 +115,8 @@ class AutoboxInputSpec(AFNICommandInputSpec):
115
115
desc = 'Number of extra voxels to pad on each side of box' )
116
116
out_file = File (
117
117
argstr = '-prefix %s' ,
118
- name_source = 'in_file' )
118
+ name_source = 'in_file' ,
119
+ name_template = '%s_autobox' )
119
120
no_clustering = traits .Bool (
120
121
argstr = '-noclust' ,
121
122
desc = 'Don\' t do any clustering to find box. Any non-zero voxel will '
@@ -151,7 +152,7 @@ class Autobox(AFNICommand):
151
152
>>> abox.inputs.in_file = 'structural.nii'
152
153
>>> abox.inputs.padding = 5
153
154
>>> abox.cmdline # doctest: +ALLOW_UNICODE
154
- '3dAutobox -input structural.nii -prefix structural_generated -npad 5'
155
+ '3dAutobox -input structural.nii -prefix structural_autobox -npad 5'
155
156
>>> res = abox.run() # doctest: +SKIP
156
157
157
158
"""
@@ -161,7 +162,7 @@ class Autobox(AFNICommand):
161
162
output_spec = AutoboxOutputSpec
162
163
163
164
def aggregate_outputs (self , runtime = None , needed_outputs = None ):
164
- outputs = self . _outputs ( )
165
+ outputs = super ( Autobox , self ). aggregate_outputs ( runtime , needed_outputs )
165
166
pattern = 'x=(?P<x_min>-?\d+)\.\.(?P<x_max>-?\d+) ' \
166
167
'y=(?P<y_min>-?\d+)\.\.(?P<y_max>-?\d+) ' \
167
168
'z=(?P<z_min>-?\d+)\.\.(?P<z_max>-?\d+)'
@@ -172,13 +173,8 @@ def aggregate_outputs(self, runtime=None, needed_outputs=None):
172
173
for k in list (d .keys ()):
173
174
d [k ] = int (d [k ])
174
175
outputs .set (** d )
175
- outputs .set (out_file = self ._gen_filename ('out_file' ))
176
176
return outputs
177
177
178
- def _gen_filename (self , name ):
179
- if name == 'out_file' and (not isdefined (self .inputs .out_file )):
180
- return Undefined
181
- return super (Autobox , self )._gen_filename (name )
182
178
183
179
184
180
class BrickStatInputSpec (CommandLineInputSpec ):
0 commit comments