Skip to content

Commit

Permalink
wip: add a flag to reuse freesurfer as is, for longitudinal base case
Browse files Browse the repository at this point in the history
  • Loading branch information
bpinsard committed Mar 14, 2024
1 parent c46c893 commit 6547830
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fmriprep/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,12 @@ def _slice_time_ref(value, parser):
dest='run_reconall',
help='Disable FreeSurfer surface preprocessing.',
)
g_fs.add_argument(
"--fs-reuse-base",
action="store_true",
dest="fs_reuse_base",
help="Reuse freesurfer base template (from longitudinal preprocessing)",
)

g_carbon = parser.add_argument_group('Options for carbon usage tracking')
g_carbon.add_argument(
Expand Down
2 changes: 2 additions & 0 deletions fmriprep/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,8 @@ class workflow(_Config):
"""Run *fieldmap-less* susceptibility-derived distortions estimation."""
hires = None
"""Run FreeSurfer ``recon-all`` with the ``-hires`` flag."""
fs_reuse_base = None
"""Adjust pipeline to reuse base template of existing longitudinal freesurfer"""
ignore = None
"""Ignore particular steps for *fMRIPrep*."""
level = None
Expand Down
1 change: 1 addition & 0 deletions fmriprep/workflows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ def init_single_subject_wf(subject_id: str):
output_dir=fmriprep_dir,
freesurfer=config.workflow.run_reconall,
hires=config.workflow.hires,
fs_reuse_base=config.workflow.fs_reuse_base,
longitudinal=config.workflow.longitudinal,
msm_sulc=msm_sulc,
t1w=subject_data['t1w'],
Expand Down

0 comments on commit 6547830

Please sign in to comment.