File tree Expand file tree Collapse file tree 1 file changed +4
-21
lines changed Expand file tree Collapse file tree 1 file changed +4
-21
lines changed Original file line number Diff line number Diff line change @@ -950,7 +950,10 @@ class CalcInputSpec(CommandLineInputSpec):
950
950
desc = 'output file' ,
951
951
genfile = True ,
952
952
argstr = '%s' ,
953
- position = - 1 ,)
953
+ position = - 1 ,
954
+ name_source = ['input_files' ],
955
+ hash_files = False ,
956
+ name_template = '%s_calc.mnc' )
954
957
955
958
two = traits .Bool (desc = 'Create a MINC 2 output file.' , argstr = '-2' )
956
959
@@ -1145,26 +1148,6 @@ class Calc(CommandLine):
1145
1148
output_spec = CalcOutputSpec
1146
1149
_cmd = 'minccalc'
1147
1150
1148
- def _gen_filename (self , name ):
1149
- if name == 'output_file' :
1150
- output_file = self .inputs .output_file
1151
-
1152
- if isdefined (output_file ):
1153
- return os .path .abspath (output_file )
1154
- else :
1155
- return aggregate_filename (
1156
- [self .inputs .input_file ], 'calc_output' )
1157
- else :
1158
- raise NotImplemented
1159
-
1160
- def _gen_outfilename (self ):
1161
- return self ._gen_filename ('output_file' )
1162
-
1163
- def _list_outputs (self ):
1164
- outputs = self .output_spec ().get ()
1165
- outputs ['output_file' ] = os .path .abspath (self ._gen_outfilename ())
1166
- return outputs
1167
-
1168
1151
1169
1152
# FIXME mincbbox produces output like
1170
1153
#
You can’t perform that action at this time.
0 commit comments