Skip to content

Commit f6b49f5

Browse files
author
Adam Richie-Halford
committed
Add output_dir check to EddyQuad._list_outputs()
1 parent d01bf40 commit f6b49f5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

nipype/interfaces/fsl/epi.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,14 @@ class EddyQuad(FSLCommand):
13851385
def _list_outputs(self):
13861386
from glob import glob
13871387
outputs = self.output_spec().get()
1388-
out_dir = os.path.abspath(self.inputs.output_dir)
1388+
1389+
# If the output directory isn't defined, the interface seems to use
1390+
# the default but not set its value in `self.inputs.output_dir`
1391+
if not isdefined(self.inputs.output_dir):
1392+
out_dir = os.path.abspath(self.inputs.base_name + '.qc.nii.gz')
1393+
else:
1394+
out_dir = os.path.abspath(self.inputs.output_dir)
1395+
13891396
outputs['out_qc_json'] = os.path.join(out_dir, 'qc.json')
13901397
outputs['out_qc_pdf'] = os.path.join(out_dir, 'qc.pdf')
13911398

0 commit comments

Comments
 (0)