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

ENH: Restore resampling to surface GIFTIs #3126

Merged
merged 3 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 20 additions & 21 deletions fmriprep/workflows/bold/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,26 @@
(bold_std_wf, ds_bold_std_wf, [('outputnode.bold_file', 'inputnode.bold')]),
]) # fmt:skip

if config.workflow.run_reconall and freesurfer_spaces:
config.loggers.workflow.debug("Creating BOLD surface-sampling workflow.")
bold_surf_wf = init_bold_surf_wf(

Check warning on line 447 in fmriprep/workflows/bold/base.py

View check run for this annotation

Codecov / codecov/patch

fmriprep/workflows/bold/base.py#L445-L447

Added lines #L445 - L447 were not covered by tests
mem_gb=mem_gb["resampled"],
surface_spaces=freesurfer_spaces,
medial_surface_nan=config.workflow.medial_surface_nan,
metadata=all_metadata[0],
output_dir=fmriprep_dir,
name="bold_surf_wf",
)
bold_surf_wf.inputs.inputnode.source_file = bold_file
workflow.connect([

Check warning on line 456 in fmriprep/workflows/bold/base.py

View check run for this annotation

Codecov / codecov/patch

fmriprep/workflows/bold/base.py#L455-L456

Added lines #L455 - L456 were not covered by tests
(inputnode, bold_surf_wf, [
("subjects_dir", "inputnode.subjects_dir"),
("subject_id", "inputnode.subject_id"),
("fsnative2t1w_xfm", "inputnode.fsnative2t1w_xfm"),
]),
(bold_anat_wf, bold_surf_wf, [("outputnode.bold_file", "inputnode.bold_t1w")]),
]) # fmt:skip

bold_confounds_wf = init_bold_confs_wf(
mem_gb=mem_gb["largemem"],
metadata=all_metadata[0],
Expand Down Expand Up @@ -723,27 +743,6 @@
)

# SURFACES ##################################################################################
# Freesurfer
if freesurfer and freesurfer_spaces:
config.loggers.workflow.debug("Creating BOLD surface-sampling workflow.")
bold_surf_wf = init_bold_surf_wf(
mem_gb=mem_gb["resampled"],
surface_spaces=freesurfer_spaces,
medial_surface_nan=config.workflow.medial_surface_nan,
name="bold_surf_wf",
)
# fmt:off
workflow.connect([
(inputnode, bold_surf_wf, [
("subjects_dir", "inputnode.subjects_dir"),
("subject_id", "inputnode.subject_id"),
("fsnative2t1w_xfm", "inputnode.fsnative2t1w_xfm"),
]),
(bold_t1_trans_wf, bold_surf_wf, [("outputnode.bold_t1", "inputnode.source_file")]),
(bold_surf_wf, outputnode, [("outputnode.surfaces", "surfaces")]),
(bold_surf_wf, func_derivatives_wf, [("outputnode.target", "inputnode.surf_refs")]),
])
# fmt:on

# CIFTI output
if config.workflow.cifti_output:
Expand Down