@@ -117,7 +117,7 @@ class SVAdjustVoxSpInputSpec(CommandLineInputSpec):
117117 position = 2 , argstr = "-target %s" )
118118 in_voxsz = traits .Str (desc = 'resampled voxel size' , exists = True ,
119119 mandatory = False , position = 3 , argstr = "-vsize %s" )
120- out_path = traits .Str (desc = 'output path' , exists = True , mandatory = False ,
120+ out_file = traits .Str (desc = 'output path' , exists = True , mandatory = False ,
121121 position = 1 , argstr = "-out %s" ,
122122 name_source = "in_file" ,
123123 name_template = '%s_origmvd.nii.gz' )
@@ -146,23 +146,23 @@ class SVAdjustVoxSpTask(CommandLineDtitk):
146146 _cmd = 'SVAdjustVoxelspace'
147147 _suffix = '_reslice'
148148
149+ def _gen_filename (self , name ):
150+ if name == "out_file" :
151+ return self ._list_outputs ()["out_file" ]
152+ return None
153+
149154 def _list_outputs (self ):
150155 outputs = self .output_spec ().get ()
151156 outputs ['out_file' ] = self .inputs .out_file
152157 if not isdefined (self .inputs .out_file ):
153- outputs ["out_file" ] = self ._gen_fname (self .inputs .in_file ,
158+ outputs ["out_file" ] = self ._gen_filename (self .inputs .in_file ,
154159 suffix = self ._suffix ,
155160 ext = '.' + '.' .join (
156161 self .inputs .in_file .
157- plit ("." )[1 :]))
162+ split ("." )[1 :]))
158163 outputs ["out_file" ] = os .path .abspath (outputs ["out_file" ])
159164 return outputs
160165
161- def _gen_filename (self , name ):
162- if name == "out_file" :
163- return self ._list_outputs ()["out_file" ]
164- return None
165-
166166
167167class TVResampleInputSpec (CommandLineInputSpec ):
168168 in_file = traits .Str (desc = "image to resample" , exists = True ,
0 commit comments