Skip to content

Commit 6547830

Browse files
committed
wip: add a flag to reuse freesurfer as is, for longitudinal base case
1 parent c46c893 commit 6547830

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

fmriprep/cli/parser.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,12 @@ def _slice_time_ref(value, parser):
635635
dest='run_reconall',
636636
help='Disable FreeSurfer surface preprocessing.',
637637
)
638+
g_fs.add_argument(
639+
"--fs-reuse-base",
640+
action="store_true",
641+
dest="fs_reuse_base",
642+
help="Reuse freesurfer base template (from longitudinal preprocessing)",
643+
)
638644

639645
g_carbon = parser.add_argument_group('Options for carbon usage tracking')
640646
g_carbon.add_argument(

fmriprep/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,8 @@ class workflow(_Config):
561561
"""Run *fieldmap-less* susceptibility-derived distortions estimation."""
562562
hires = None
563563
"""Run FreeSurfer ``recon-all`` with the ``-hires`` flag."""
564+
fs_reuse_base = None
565+
"""Adjust pipeline to reuse base template of existing longitudinal freesurfer"""
564566
ignore = None
565567
"""Ignore particular steps for *fMRIPrep*."""
566568
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_reuse_base=config.workflow.fs_reuse_base,
324325
longitudinal=config.workflow.longitudinal,
325326
msm_sulc=msm_sulc,
326327
t1w=subject_data['t1w'],

0 commit comments

Comments
 (0)