@@ -117,7 +117,7 @@ class SVAdjustVoxSpInputSpec(CommandLineInputSpec):
117
117
position = 2 , argstr = "-target %s" )
118
118
in_voxsz = traits .Str (desc = 'resampled voxel size' , exists = True ,
119
119
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 ,
121
121
position = 1 , argstr = "-out %s" ,
122
122
name_source = "in_file" ,
123
123
name_template = '%s_origmvd.nii.gz' )
@@ -146,23 +146,23 @@ class SVAdjustVoxSpTask(CommandLineDtitk):
146
146
_cmd = 'SVAdjustVoxelspace'
147
147
_suffix = '_reslice'
148
148
149
+ def _gen_filename (self , name ):
150
+ if name == "out_file" :
151
+ return self ._list_outputs ()["out_file" ]
152
+ return None
153
+
149
154
def _list_outputs (self ):
150
155
outputs = self .output_spec ().get ()
151
156
outputs ['out_file' ] = self .inputs .out_file
152
157
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 ,
154
159
suffix = self ._suffix ,
155
160
ext = '.' + '.' .join (
156
161
self .inputs .in_file .
157
- plit ("." )[1 :]))
162
+ split ("." )[1 :]))
158
163
outputs ["out_file" ] = os .path .abspath (outputs ["out_file" ])
159
164
return outputs
160
165
161
- def _gen_filename (self , name ):
162
- if name == "out_file" :
163
- return self ._list_outputs ()["out_file" ]
164
- return None
165
-
166
166
167
167
class TVResampleInputSpec (CommandLineInputSpec ):
168
168
in_file = traits .Str (desc = "image to resample" , exists = True ,
0 commit comments