Skip to content

Commit ed45069

Browse files
committed
fix to label2vol
1 parent 0437713 commit ed45069

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nipype/interfaces/freesurfer/model.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,10 @@ def _list_outputs(self):
756756
if not isdefined(outfile):
757757
for key in ['label_file', 'annot_file', 'seg_file']:
758758
if isdefined(getattr(self.inputs,key)):
759-
_, src = os.path.split(getattr(self.inputs, key))
759+
foo = getattr(self.inputs, key)
760+
if isinstance(foo,list):
761+
foo = foo[0]
762+
_, src = os.path.split(foo)
760763
if isdefined(self.inputs.aparc_aseg):
761764
src = 'aparc+aseg.mgz'
762765
outfile = fname_presuffix(src, suffix='_vol.nii.gz',

0 commit comments

Comments
 (0)