Skip to content

Commit 5b843f9

Browse files
committed
fixed refit
1 parent bc10ead commit 5b843f9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@ class RefitInputSpec(AFNICommandInputSpec):
157157
exists=True,
158158
copyfile=True)
159159

160-
out_file = File(name_template="%s_refit", desc='output image file name, should be the same as input',
161-
argstr='%s', name_source="in_file")
162-
163160
deoblique = traits.Bool(desc='replace current transformation' +
164161
' matrix with cardinal matrix',
165162
argstr='-deoblique')
@@ -186,16 +183,20 @@ class Refit(AFNICommand):
186183
>>> refit = afni.Refit()
187184
>>> refit.inputs.in_file = 'structural.nii'
188185
>>> refit.inputs.deoblique = True
189-
>>> refit.inputs.outputtype = "NIFTI_GZ"
190186
>>> refit.cmdline
191-
'3drefit -deoblique structural_refit.nii.gz structural.nii'
187+
'3drefit -deoblique structural.nii'
192188
>>> res = refit.run() # doctest: +SKIP
193189
194190
"""
195191

196192
_cmd = '3drefit'
197193
input_spec = RefitInputSpec
198194
output_spec = AFNICommandOutputSpec
195+
196+
def _list_outputs(self):
197+
outputs = super(AFNICommand, self)._list_outputs()
198+
outputs["out_file"] = os.path.abspath(self.inputs.in_file)
199+
return outputs
199200

200201

201202
class WarpInputSpec(AFNICommandInputSpec):

0 commit comments

Comments
 (0)