Skip to content

Commit b9a7b1a

Browse files
author
blakedewey
committed
Corrected Freesurfer SegStats
Corrected Freesurfer SegStats _list_outputs to avoid error if summary_file is undefined (issue #994)
1 parent 63f282a commit b9a7b1a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nipype/interfaces/freesurfer/model.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,9 @@ class SegStats(FSCommand):
635635

636636
def _list_outputs(self):
637637
outputs = self.output_spec().get()
638-
outputs['summary_file'] = os.path.abspath(self.inputs.summary_file)
639-
if not isdefined(outputs['summary_file']):
638+
if isdefined(self.inputs.summary_file):
639+
outputs['summary_file'] = os.path.abspath(self.inputs.summary_file)
640+
else:
640641
outputs['summary_file'] = os.path.join(os.getcwd(), 'summary.stats')
641642
suffices = dict(avgwf_txt_file='_avgwf.txt', avgwf_file='_avgwf.nii.gz',
642643
sf_avg_file='sfavg.txt')

0 commit comments

Comments
 (0)