@@ -3432,7 +3432,10 @@ class BigAverageInputSpec(CommandLineInputSpec):
34323432 desc = 'output file' ,
34333433 genfile = True ,
34343434 argstr = '%s' ,
3435- position = - 1 ,)
3435+ position = - 1 ,
3436+ name_source = ['input_files' ],
3437+ hash_files = False ,
3438+ name_template = '%s_bigaverage.mnc' )
34363439
34373440 verbose = traits .Bool (
34383441 desc = 'Print out log messages. Default: False.' ,
@@ -3461,7 +3464,9 @@ class BigAverageInputSpec(CommandLineInputSpec):
34613464 sd_file = File (
34623465 desc = 'Place standard deviation image in specified file.' ,
34633466 argstr = '--sdfile %s' ,
3464- genfile = True )
3467+ name_source = ['input_files' ],
3468+ hash_files = False ,
3469+ name_template = '%s_bigaverage_stdev.mnc' )
34653470
34663471
34673472class BigAverageOutputSpec (TraitedSpec ):
@@ -3506,37 +3511,6 @@ class BigAverage(CommandLine):
35063511 output_spec = BigAverageOutputSpec
35073512 _cmd = 'mincbigaverage'
35083513
3509- def _gen_filename (self , name ):
3510- if name == 'output_file' :
3511- output_file = self .inputs .output_file
3512-
3513- if isdefined (output_file ):
3514- return os .path .abspath (output_file )
3515- else :
3516- return aggregate_filename (
3517- self .inputs .input_files , 'mincbigaverage_output' )
3518- elif name == 'sd_file' :
3519- sd_file = self .inputs .sd_file
3520-
3521- if isdefined (sd_file ):
3522- return os .path .abspath (sd_file )
3523- else :
3524- return aggregate_filename (
3525- self .inputs .input_files ,
3526- 'mincbigaverage_sd_file_output' )
3527- else :
3528- raise NotImplemented
3529-
3530- def _gen_outfilename (self ):
3531- return self ._gen_filename ('output_file' )
3532-
3533- def _list_outputs (self ):
3534- outputs = self .output_spec ().get ()
3535- outputs ['output_file' ] = os .path .abspath (
3536- self ._gen_filename ('output_file' ))
3537- outputs ['sd_file' ] = os .path .abspath (self ._gen_filename ('sd_file' ))
3538- return outputs
3539-
35403514
35413515class ReshapeInputSpec (CommandLineInputSpec ):
35423516 input_file = traits .File (
0 commit comments