Skip to content

Commit e5e5edd

Browse files
authored
Merge pull request #1702 from ellisdg/ReconAllFlags
ENH: Allows ReconAll.inputs.flags to take in a list of flags
2 parents 8fb1946 + 4fc2ba6 commit e5e5edd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

nipype/interfaces/freesurfer/preprocess.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ class ReconAllInputSpec(CommandLineInputSpec):
652652
desc="Use, delete or overwrite existing expert options file")
653653
subjects_dir = Directory(exists=True, argstr='-sd %s', hash_files=False,
654654
desc='path to subjects directory', genfile=True)
655-
flags = traits.Str(argstr='%s', desc='additional parameters')
655+
flags = InputMultiPath(traits.Str, argstr='%s', desc='additional parameters')
656656

657657
# Expert options
658658
talairach = traits.Str(desc="Flags to pass to talairach commands", xor=['expert'])
@@ -703,7 +703,12 @@ class ReconAll(CommandLine):
703703
>>> reconall.inputs.T1_files = 'structural.nii'
704704
>>> reconall.cmdline # doctest: +ALLOW_UNICODE
705705
'recon-all -all -i structural.nii -subjid foo -sd .'
706-
706+
>>> reconall.inputs.flags = "-qcache"
707+
>>> reconall.cmdline # doctest: +ALLOW_UNICODE
708+
'recon-all -all -i structural.nii -qcache -subjid foo -sd .'
709+
>>> reconall.inputs.flags = ["-cw256", "-qcache"]
710+
>>> reconall.cmdline # doctest: +ALLOW_UNICODE
711+
'recon-all -all -i structural.nii -cw256 -qcache -subjid foo -sd .'
707712
"""
708713

709714
_cmd = 'recon-all'

0 commit comments

Comments
 (0)