Skip to content

Commit 5cfbea9

Browse files
committed
DOC: Add doctests for fiddly ReconAll invocations
1 parent 833c428 commit 5cfbea9

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

nipype/interfaces/freesurfer/preprocess.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,34 @@ class ReconAll(CommandLine):
712712
>>> reconall.cmdline # doctest: +ALLOW_UNICODE
713713
'recon-all -all -i structural.nii -subjid foo -sd .'
714714
715+
Hemisphere may be specified regardless of directive:
716+
717+
>>> reconall_left = reconall.copy()
718+
>>> reconall_left.inputs.hemi = 'lh'
719+
>>> reconall_left.cmdline # doctest: +ALLOW_UNICODE
720+
'recon-all -all -hemi lh -i structural.nii -subjid foo -sd .'
721+
722+
``-autorecon-hemi`` uses the ``-hemi`` input to specify the hemisphere
723+
to operate upon:
724+
725+
>>> reconall_left.inputs.directive = 'autorecon-hemi'
726+
>>> reconall_left.cmdline # doctest: +ALLOW_UNICODE
727+
'recon-all -autorecon-hemi lh -i structural.nii -subjid foo -sd .'
728+
729+
Hippocampal subfields can accept T1 and T2 images:
730+
731+
>>> reconall_subfields = reconall.copy()
732+
>>> reconall_subfields.inputs.hippocampal_subfields_T1 = True
733+
>>> reconall_subfields.cmdline # doctest: +ALLOW_UNICODE
734+
'recon-all -all -i structural.nii -subjid foo -hippocampal-subfields-T1 -sd .'
735+
>>> reconall_subfields.inputs.hippocampal_subfields_T2 = (
736+
... 'structural.nii', 'test')
737+
>>> reconall_subfields.cmdline # doctest: +ALLOW_UNICODE
738+
'recon-all -all -i structural.nii -subjid foo -hippocampal-subfields-T1T2 structural.nii test -sd .'
739+
>>> reconall_subfields.inputs.hippocampal_subfields_T1 = False
740+
>>> reconall_subfields.cmdline # doctest: +ALLOW_UNICODE
741+
'recon-all -all -i structural.nii -subjid foo -hippocampal-subfields-T2 structural.nii test -sd .'
742+
715743
"""
716744

717745
_cmd = 'recon-all'

0 commit comments

Comments
 (0)