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 T1w target #3116

Merged
merged 19 commits into from
Oct 26, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
RF: Remove old t1 workflow
  • Loading branch information
effigies committed Oct 23, 2023
commit 9bcfdace0f988dd8f507564e6c2fee7f5b6d6136
48 changes: 0 additions & 48 deletions fmriprep/workflows/bold/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,16 +615,6 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False):
name="outputnode",
)

# apply BOLD registration to T1w
bold_t1_trans_wf = init_bold_t1_trans_wf(
name="bold_t1_trans_wf",
freesurfer=freesurfer,
mem_gb=mem_gb["resampled"],
omp_nthreads=omp_nthreads,
use_compression=False,
)
bold_t1_trans_wf.inputs.inputnode.fieldwarp = "identity"

# get confounds
bold_confounds_wf = init_bold_confs_wf(
mem_gb=mem_gb["largemem"],
Expand All @@ -637,44 +627,6 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False):
)
bold_confounds_wf.get_node("inputnode").inputs.t1_transform_flags = [False]

# Map final BOLD mask into T1w space (if required)
nonstd_spaces = set(spaces.get_nonstandard())
if nonstd_spaces.intersection(("T1w", "anat")):
from niworkflows.interfaces.fixes import (
FixHeaderApplyTransforms as ApplyTransforms,
)

boldmask_to_t1w = pe.Node(
ApplyTransforms(interpolation="MultiLabel"),
name="boldmask_to_t1w",
mem_gb=0.1,
)
# fmt:off
workflow.connect([
(bold_reg_wf, boldmask_to_t1w, [("outputnode.itk_bold_to_t1", "transforms")]),
(bold_t1_trans_wf, boldmask_to_t1w, [("outputnode.bold_mask_t1", "reference_image")]),
(bold_final, boldmask_to_t1w, [("mask", "input_image")]),
(boldmask_to_t1w, outputnode, [("output_image", "bold_mask_t1")]),
])
# fmt:on

if multiecho:
t2star_to_t1w = pe.Node(
ApplyTransforms(interpolation="LanczosWindowedSinc", float=True),
name="t2star_to_t1w",
mem_gb=0.1,
)
# fmt:off
workflow.connect([
(bold_reg_wf, t2star_to_t1w, [("outputnode.itk_bold_to_t1", "transforms")]),
(bold_t1_trans_wf, t2star_to_t1w, [
("outputnode.bold_mask_t1", "reference_image")
]),
(bold_final, t2star_to_t1w, [("t2star", "input_image")]),
(t2star_to_t1w, outputnode, [("output_image", "t2star_t1")]),
])
# fmt:on

if spaces.get_spaces(nonstandard=False, dim=(3,)):
# Apply transforms in 1 shot
bold_std_trans_wf = init_bold_std_trans_wf(
Expand Down