File tree Expand file tree Collapse file tree 1 file changed +5
-20
lines changed Expand file tree Collapse file tree 1 file changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,11 @@ class ToRawInputSpec(StdOutCommandLineInputSpec):
275
275
276
276
output_file = File (
277
277
desc = 'output file' ,
278
- position = - 1 )
278
+ position = - 1 ,
279
+ name_source = ['input_file' ],
280
+ hash_files = False ,
281
+ name_template = '%s.raw' ,
282
+ keep_extension = False )
279
283
280
284
_xor_write = ('write_byte' , 'write_short' , 'write_int' ,
281
285
'write_long' , 'write_float' , 'write_double' )
@@ -365,25 +369,6 @@ class ToRaw(StdOutCommandLine):
365
369
output_spec = ToRawOutputSpec
366
370
_cmd = 'minctoraw'
367
371
368
- def _gen_outfilename (self ):
369
- """
370
- If the user specified output_file then return that, otherwise
371
- return the full path to the input file with the extension
372
- changed to '.raw'.
373
- """
374
-
375
- output_file = self .inputs .output_file
376
-
377
- if isdefined (output_file ):
378
- return output_file
379
- else :
380
- return os .path .splitext (self .inputs .input_file )[0 ] + '.raw'
381
-
382
- def _list_outputs (self ):
383
- outputs = self .output_spec ().get ()
384
- outputs ['output_file' ] = os .path .abspath (self ._gen_outfilename ())
385
- return outputs
386
-
387
372
388
373
class ConvertInputSpec (CommandLineInputSpec ):
389
374
input_file = File (
You can’t perform that action at this time.
0 commit comments