Skip to content

Commit 9db6ba0

Browse files
authored
Flip order of transforms in init_ds_volumes_wf (#3238)
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.
1 parent b8d6af3 commit 9db6ba0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fmriprep/workflows/bold/outputs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,10 @@ def init_ds_volumes_wf(
736736
workflow.connect([
737737
(inputnode, raw_sources, [('source_files', 'in_files')]),
738738
(inputnode, boldref2target, [
739-
('boldref2anat_xfm', 'in1'),
740-
('anat2std_xfm', 'in2'),
739+
# Note that ANTs expects transforms in target-to-source order
740+
# Reverse this for nitransforms-based resamplers
741+
('anat2std_xfm', 'in1'),
742+
('boldref2anat_xfm', 'in2'),
741743
]),
742744
(inputnode, ds_bold, [
743745
('source_files', 'source_file'),

0 commit comments

Comments
 (0)