@@ -3432,7 +3432,10 @@ class BigAverageInputSpec(CommandLineInputSpec):
3432
3432
desc = 'output file' ,
3433
3433
genfile = True ,
3434
3434
argstr = '%s' ,
3435
- position = - 1 ,)
3435
+ position = - 1 ,
3436
+ name_source = ['input_files' ],
3437
+ hash_files = False ,
3438
+ name_template = '%s_bigaverage.mnc' )
3436
3439
3437
3440
verbose = traits .Bool (
3438
3441
desc = 'Print out log messages. Default: False.' ,
@@ -3461,7 +3464,9 @@ class BigAverageInputSpec(CommandLineInputSpec):
3461
3464
sd_file = File (
3462
3465
desc = 'Place standard deviation image in specified file.' ,
3463
3466
argstr = '--sdfile %s' ,
3464
- genfile = True )
3467
+ name_source = ['input_files' ],
3468
+ hash_files = False ,
3469
+ name_template = '%s_bigaverage_stdev.mnc' )
3465
3470
3466
3471
3467
3472
class BigAverageOutputSpec (TraitedSpec ):
@@ -3506,37 +3511,6 @@ class BigAverage(CommandLine):
3506
3511
output_spec = BigAverageOutputSpec
3507
3512
_cmd = 'mincbigaverage'
3508
3513
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
-
3540
3514
3541
3515
class ReshapeInputSpec (CommandLineInputSpec ):
3542
3516
input_file = traits .File (
0 commit comments