Skip to content

Commit

Permalink
FIX: Add none option when selecting surface recon method, deprecated …
Browse files Browse the repository at this point in the history
…ambiguous options
  • Loading branch information
mgxd committed Sep 26, 2024
1 parent a4e5740 commit ab70ba9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions nibabies/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def _build_parser():
# parser attribute name: (replacement flag, version slated to be removed in)
'bold2t1w_init': ('--bold2anat-init', '24.2.0'),
'bold2t1w_dof': ('--bold2anat-dof', '24.2.0'),
'force_reconall': ('--surface-recon-method freesurfer', '24.2.0'),
'fs_no_reconall': ('--surface-recon-method none', '24.2.0'),
}

class DeprecatedAction(Action):
Expand Down Expand Up @@ -597,9 +599,9 @@ def _slice_time_ref(value, parser):
)
g_surfs_xor.add_argument(
'--fs-no-reconall',
action='store_false',
action=DeprecatedAction,
dest='run_reconall',
help='disable FreeSurfer surface preprocessing.',
help='Deprecated - use `--surface-recon-method none` instead.',
)

g_other = parser.add_argument_group('Other options')
Expand Down Expand Up @@ -728,14 +730,14 @@ def _slice_time_ref(value, parser):
g_baby.add_argument(
'--force-reconall',
default=False,
action='store_true',
help='Force traditional FreeSurfer surface reconstruction.',
action=DeprecatedAction,
help='Deprecated - use `--surface-recon-method freesurfer` instead.',
)
g_baby.add_argument(
'--surface-recon-method',
choices=('infantfs', 'freesurfer', 'mcribs', 'auto'),
choices=('auto', 'infantfs', 'freesurfer', 'mcribs', 'none'),
default='auto',
help='Method to use for surface reconstruction',
help='Method to use for surface reconstruction.',
)
g_baby.add_argument(
'--reference-anat',
Expand Down

0 comments on commit ab70ba9

Please sign in to comment.