@@ -86,8 +86,9 @@ class CreateTiledMosaicInputSpec(ANTSCommandInputSpec):
86
86
alpha_value = traits .Float (argstr = '-a %.2f' ,
87
87
desc = ('If an Rgb image is provided, render the overlay '
88
88
'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 )
91
92
tile_geometry = traits .Str (argstr = '-t %s' ,desc = (
92
93
'The tile geometry specifies the number of rows and columns'
93
94
'in the output image. For example, if the user specifies "5x10", '
@@ -148,15 +149,9 @@ class CreateTiledMosaic(ANTSCommand):
148
149
_cmd = 'CreateTiledMosaic'
149
150
input_spec = CreateTiledMosaicInputSpec
150
151
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
+
159
153
def _list_outputs (self ):
160
154
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