@@ -87,6 +87,10 @@ def init_coeff2epi_wf(
87
87
target_ref
88
88
the target reference EPI resampled into the fieldmap reference for
89
89
quality control purposes.
90
+ target2fmap_xfm
91
+ An ITK-style transform produced with ANTs that can be used as transform in
92
+ ``antsApplyTransforms`` with the fieldmap as reference and the target EPI
93
+ as moving, resampling the latter into the fieldmap space.
90
94
91
95
"""
92
96
from packaging .version import parse as parseversion , Version
@@ -107,7 +111,8 @@ def init_coeff2epi_wf(
107
111
name = "inputnode" ,
108
112
)
109
113
outputnode = pe .Node (
110
- niu .IdentityInterface (fields = ["target_ref" , "fmap_coeff" ]), name = "outputnode"
114
+ niu .IdentityInterface (fields = ["target_ref" , "fmap_coeff" , "target2fmap_xfm" ]),
115
+ name = "outputnode" ,
111
116
)
112
117
113
118
# Register the reference of the fieldmap to the reference
@@ -133,14 +138,17 @@ def init_coeff2epi_wf(
133
138
("target_mask" , f"moving_image_mask{ mask_trait_s } " ),
134
139
("fmap_mask" , f"fixed_image_mask{ mask_trait_s } " ),
135
140
]),
136
- (coregister , outputnode , [("warped_image" , "target_ref" )]),
141
+ (coregister , outputnode , [
142
+ ("warped_image" , "target_ref" ),
143
+ ("forward_transforms" , "target2fmap_xfm" ),
144
+ ]),
137
145
])
138
146
# fmt: on
139
147
140
148
if not write_coeff :
141
149
return workflow
142
150
143
- # Map the coefficients into the EPI space
151
+ # Resample the coefficients into the EPI grid
144
152
map_coeff = pe .Node (TransformCoefficients (), name = "map_coeff" )
145
153
map_coeff .interface ._always_run = debug
146
154
0 commit comments