@@ -86,8 +86,9 @@ class CreateTiledMosaicInputSpec(ANTSCommandInputSpec):
8686 alpha_value = traits .Float (argstr = '-a %.2f' ,
8787 desc = ('If an Rgb image is provided, render the overlay '
8888 'using the specified alpha parameter.' ))
89- output_image = traits .Str (argstr = '-o %s' ,
90- desc = 'The output consists of the tiled mosaic image.' )
89+ output_image = traits .Str ('output.png' , argstr = '-o %s' ,
90+ desc = 'The output consists of the tiled mosaic image.' ,
91+ usedefault = True )
9192 tile_geometry = traits .Str (argstr = '-t %s' ,desc = (
9293 'The tile geometry specifies the number of rows and columns'
9394 'in the output image. For example, if the user specifies "5x10", '
@@ -148,15 +149,9 @@ class CreateTiledMosaic(ANTSCommand):
148149 _cmd = 'CreateTiledMosaic'
149150 input_spec = CreateTiledMosaicInputSpec
150151 output_spec = CreateTiledMosaicOutputSpec
151-
152- def _gen_outfilename (self ):
153- output_image = self .inputs .output_image
154- if not isdefined (output_image ) and isdefined (self .inputs .input_image ):
155- path , _ , _ = split_filename (self .inputs .input_image )
156- output_image = os .path .join (path , 'out.png' )
157- return output_image
158-
152+
159153 def _list_outputs (self ):
160154 outputs = self ._outputs ().get ()
161- output_image = self ._gen_outfilename ()
162- outputs ['output_image' ] = output_image
155+ outputs ['output_image' ] = os .path .join (os .getcwd (),
156+ self .inputs .output_image )
157+ return outputs
0 commit comments