Skip to content

Commit 967ef92

Browse files
authored
Merge pull request #3028 from nipy/gpiantoni/2921-replacement
FIX: Qwarp in AFNI can have NIFTI and NIFTI_GZ as extensions
2 parents c69d4ad + d229372 commit 967ef92

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3773,13 +3773,18 @@ def _list_outputs(self):
37733773

37743774
if not isdefined(self.inputs.out_file):
37753775
prefix = self._gen_fname(self.inputs.in_file, suffix='_QW')
3776-
ext = '.HEAD'
3777-
suffix = '+tlrc'
3776+
outputtype = self.inputs.outputtype
3777+
if outputtype == 'AFNI':
3778+
ext = '.HEAD'
3779+
suffix = '+tlrc'
3780+
else:
3781+
ext = Info.output_type_to_ext(outputtype)
3782+
suffix = ''
37783783
else:
37793784
prefix = self.inputs.out_file
37803785
ext_ind = max([
37813786
prefix.lower().rfind('.nii.gz'),
3782-
prefix.lower().rfind('.nii.')
3787+
prefix.lower().rfind('.nii')
37833788
])
37843789
if ext_ind == -1:
37853790
ext = '.HEAD'

0 commit comments

Comments
 (0)