File tree Expand file tree Collapse file tree 1 file changed +5
-21
lines changed Expand file tree Collapse file tree 1 file changed +5
-21
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,11 @@ class ExtractInputSpec(StdOutCommandLineInputSpec):
73
73
74
74
output_file = File (
75
75
desc = 'output file' ,
76
- position = - 1 )
76
+ position = - 1 ,
77
+ name_source = ['input_file' ],
78
+ hash_files = False ,
79
+ name_template = '%s.raw' ,
80
+ keep_extension = False )
77
81
78
82
_xor_write = ('write_ascii' , 'write_ascii' , 'write_byte' ,
79
83
'write_short' , 'write_int' , 'write_long' ,
@@ -260,26 +264,6 @@ class Extract(StdOutCommandLine):
260
264
output_spec = ExtractOutputSpec
261
265
_cmd = 'mincextract'
262
266
263
- # FIXME Does this play nicely with a workflow?
264
- def _gen_outfilename (self ):
265
- """
266
- If the user specified output_file then return that, otherwise
267
- return the full path to the input file with the extension
268
- changed to '.raw'.
269
- """
270
-
271
- output_file = self .inputs .output_file
272
-
273
- if isdefined (output_file ):
274
- return output_file
275
- else :
276
- return os .path .splitext (self .inputs .input_file )[0 ] + '.raw'
277
-
278
- def _list_outputs (self ):
279
- outputs = self .output_spec ().get ()
280
- outputs ['output_file' ] = os .path .abspath (self ._gen_outfilename ())
281
- return outputs
282
-
283
267
284
268
class ToRawInputSpec (StdOutCommandLineInputSpec ):
285
269
input_file = File (
You can’t perform that action at this time.
0 commit comments