File tree Expand file tree Collapse file tree 1 file changed +4
-20
lines changed Expand file tree Collapse file tree 1 file changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -704,7 +704,10 @@ class AverageInputSpec(CommandLineInputSpec):
704
704
desc = 'output file' ,
705
705
genfile = True ,
706
706
argstr = '%s' ,
707
- position = - 1 ,)
707
+ position = - 1 ,
708
+ name_source = ['input_files' ],
709
+ hash_files = False ,
710
+ name_template = '%s_averaged.mnc' )
708
711
709
712
two = traits .Bool (desc = 'Create a MINC 2 output file.' , argstr = '-2' )
710
713
@@ -877,25 +880,6 @@ class Average(CommandLine):
877
880
output_spec = AverageOutputSpec
878
881
_cmd = 'mincaverage'
879
882
880
- def _gen_filename (self , name ):
881
- if name == 'output_file' :
882
- output_file = self .inputs .output_file
883
-
884
- if isdefined (output_file ):
885
- return os .path .abspath (output_file )
886
- else :
887
- return aggregate_filename (self .inputs .input_files , 'averaged' )
888
- else :
889
- raise NotImplemented
890
-
891
- def _gen_outfilename (self ):
892
- return self ._gen_filename ('output_file' )
893
-
894
- def _list_outputs (self ):
895
- outputs = self .output_spec ().get ()
896
- outputs ['output_file' ] = os .path .abspath (self ._gen_outfilename ())
897
- return outputs
898
-
899
883
900
884
class BlobInputSpec (CommandLineInputSpec ):
901
885
input_file = File (
You can’t perform that action at this time.
0 commit comments