Skip to content

Commit

Permalink
Flip order of transforms in init_ds_volumes_wf (#3238)
Browse files Browse the repository at this point in the history
Closes #3237.

- Switch order of transforms in `boldref2target` node of `init_ds_volumes_wf` from boldref2anat_xfm --> anat2std_xfm to anat2std_xfm --> boldref2anat_xfm, as antsApplyTransforms expects transforms to be provided in reverse order.
  • Loading branch information
tsalo committed Feb 29, 2024
1 parent b8d6af3 commit 9db6ba0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fmriprep/workflows/bold/outputs.py
Expand Up @@ -736,8 +736,10 @@ def init_ds_volumes_wf(
workflow.connect([
(inputnode, raw_sources, [('source_files', 'in_files')]),
(inputnode, boldref2target, [
('boldref2anat_xfm', 'in1'),
('anat2std_xfm', 'in2'),
# Note that ANTs expects transforms in target-to-source order
# Reverse this for nitransforms-based resamplers
('anat2std_xfm', 'in1'),
('boldref2anat_xfm', 'in2'),
]),
(inputnode, ds_bold, [
('source_files', 'source_file'),
Expand Down

0 comments on commit 9db6ba0

Please sign in to comment.