@@ -291,17 +291,30 @@ def _format_arg(self, name, trait_spec, value):
291
291
return super (Allineate , self )._format_arg (name , trait_spec , value )
292
292
293
293
def _list_outputs (self ):
294
- outputs = self ._outputs ().get ()
295
- if not isdefined (self .inputs .out_file ):
296
- outputs ['out_file' ] = self ._gen_fname (self .inputs .in_file ,
297
- suffix = '_allineate.nii' )
298
- else :
299
- outputs ['out_file' ] = os .path .abspath (self .inputs .out_file )
294
+ outputs = self .output_spec ().get ()
295
+
296
+ if self .inputs .out_file :
297
+ outputs ['out_file' ] = op .abspath (self .inputs .out_file )
298
+
299
+ if self .inputs .out_weight_file :
300
+ outputs ['out_weight_file' ] = op .abspath (self .inputs .out_weight_file )
301
+
302
+ if self .inputs .out_matrix :
303
+ path , base , ext = split_filename (self .inputs .out_matrix )
304
+ if ext .lower () not in ['.1d' , '.1D' ]:
305
+ outputs ['out_matrix' ] = self ._gen_fname (self .inputs .out_matrix ,
306
+ suffix = '.aff12.1D' )
307
+ else :
308
+ outputs ['out_matrix' ] = op .abspath (self .inputs .out_matrix )
309
+
310
+ if self .inputs .out_param_file :
311
+ path , base , ext = split_filename (self .inputs .out_param_file )
312
+ if ext .lower () not in ['.1d' , '.1D' ]:
313
+ outputs ['out_param_file' ] = self ._gen_fname (self .inputs .out_param_file ,
314
+ suffix = '.param.1D' )
315
+ else :
316
+ outputs ['out_param_file' ] = op .abspath (self .inputs .out_param_file )
300
317
301
- if isdefined (self .inputs .out_matrix ):
302
- outputs ['out_matrix' ] = os .path .abspath (os .path .join (os .getcwd (),
303
- self .inputs .out_matrix +
304
- '.aff12.1D' ))
305
318
return outputs
306
319
307
320
def _gen_filename (self , name ):
0 commit comments