Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a --fs-reuse-base option to reuse existing freesurfer outputs from a longitudinal pipeline #3105

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions fmriprep/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,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 @@ -542,6 +542,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 @@ -297,6 +297,7 @@ def init_single_subject_wf(subject_id: str):
output_dir=str(config.execution.output_dir),
freesurfer=config.workflow.run_reconall,
hires=config.workflow.hires,
fs_reuse_base=config.workflow.fs_reuse_base,
longitudinal=config.workflow.longitudinal,
msm_sulc=config.workflow.run_msmsulc,
t1w=subject_data['t1w'],
Expand Down
Loading