@@ -95,11 +95,16 @@ def diffeomorphic_tensor_pipeline(name='DiffeoTen',
95
95
compose_xfm_node = pe .Node (dtitk .ComposeXfm (), name = 'compose_xfm_node' )
96
96
apply_xfm_node = pe .Node (dtitk .DiffeoSymTensor3DVol (),
97
97
name = 'apply_xfm_node' )
98
+ adjust_vs_node_to_input = pe .Node (dtitk .TVAdjustVoxSp (),
99
+ name = 'adjust_vs_node_to_input' )
98
100
reslice_node_to_input = pe .Node (dtitk .TVResample (),
99
101
name = 'reslice_node_to_input' )
102
+ input_fa = pe .Node (dtitk .TVtool (in_flag = 'fa' ), name = 'input_fa' )
100
103
101
104
wf = pe .Workflow (name = name )
102
105
106
+ # calculate input FA image for origin reference
107
+ wf .connect (inputnode , 'fixed_file' , input_fa , 'in_file' )
103
108
# Reslice input images
104
109
wf .connect (inputnode , 'fixed_file' , origin_node_fixed , 'in_file' )
105
110
wf .connect (origin_node_fixed , 'out_file' , reslice_node_pow2 , 'in_file' )
@@ -125,9 +130,11 @@ def diffeomorphic_tensor_pipeline(name='DiffeoTen',
125
130
# Apply transform
126
131
wf .connect (reslice_node_moving , 'out_file' , apply_xfm_node , 'in_file' )
127
132
wf .connect (compose_xfm_node , 'out_file' , apply_xfm_node , 'transform' )
128
- # Reslice to match original fixed input image
129
- wf .connect (apply_xfm_node , 'out_file' , reslice_node_to_input , 'in_file' )
130
- wf .connect (inputnode , 'fixed_file' , reslice_node_to_input , 'target_file' )
133
+ # Move origin and reslice to match original fixed input image
134
+ wf .connect (apply_xfm_node , 'out_file' , adjust_vs_node_to_input , 'in_file' )
135
+ wf .connect (input_fa , 'out_file' , adjust_vs_node_to_input , 'target_file' )
136
+ wf .connect (adjust_vs_node_to_input , 'out_file' , reslice_node_to_input , 'in_file' )
137
+ wf .connect (input_fa , 'out_file' , reslice_node_to_input , 'target_file' )
131
138
# Send to output
132
139
wf .connect (reslice_node_to_input , 'out_file' , outputnode , 'out_file' )
133
140
wf .connect (compose_xfm_node , 'out_file' , outputnode , 'out_file_xfm' )
0 commit comments