Skip to content

Commit 16e4455

Browse files
authored
ENH: Add --fs-no-resume option to reuse existing FreeSurfer outputs without resuming (#3142)
1 parent be8a4d1 commit 16e4455

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

fmriprep/cli/parser.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,13 @@ def _slice_time_ref(value, parser):
635635
dest='run_reconall',
636636
help='Disable FreeSurfer surface preprocessing.',
637637
)
638+
g_fs.add_argument(
639+
'--fs-no-resume',
640+
action='store_true',
641+
dest='fs_no_resume',
642+
help='EXPERT: Import pre-computed FreeSurfer reconstruction without resuming. '
643+
'The user is responsible for ensuring that all necessary files are present.',
644+
)
638645

639646
g_carbon = parser.add_argument_group('Options for carbon usage tracking')
640647
g_carbon.add_argument(

fmriprep/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,8 @@ class workflow(_Config):
573573
"""Run *fieldmap-less* susceptibility-derived distortions estimation."""
574574
hires = None
575575
"""Run FreeSurfer ``recon-all`` with the ``-hires`` flag."""
576+
fs_no_resume = None
577+
"""Adjust pipeline to reuse base template of existing longitudinal freesurfer"""
576578
ignore = None
577579
"""Ignore particular steps for *fMRIPrep*."""
578580
level = None

fmriprep/workflows/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ def init_single_subject_wf(subject_id: str):
321321
output_dir=fmriprep_dir,
322322
freesurfer=config.workflow.run_reconall,
323323
hires=config.workflow.hires,
324+
fs_no_resume=config.workflow.fs_no_resume,
324325
longitudinal=config.workflow.longitudinal,
325326
msm_sulc=msm_sulc,
326327
t1w=subject_data['t1w'],

0 commit comments

Comments
 (0)