@@ -55,7 +55,8 @@ def diffeomorphic_tensor_pipeline(name='DiffeoTen',
55
55
(Rigid and Affine follwed by Diffeomorphic)
56
56
Note: the requirements for a diffeomorphic registration specify that
57
57
the dimension 0 is a power of 2 so images are resliced prior to
58
- registration
58
+ registration. Remember to move origin and reslice prior to applying xfm to
59
+ another file
59
60
60
61
Example
61
62
-------
@@ -94,6 +95,8 @@ def diffeomorphic_tensor_pipeline(name='DiffeoTen',
94
95
compose_xfm_node = pe .Node (dtitk .ComposeXfm (), name = 'compose_xfm_node' )
95
96
apply_xfm_node = pe .Node (dtitk .DiffeoSymTensor3DVol (),
96
97
name = 'apply_xfm_node' )
98
+ reslice_node_to_input = pe .Node (dtitk .TVResample (),
99
+ name = 'reslice_node_to_input' )
97
100
98
101
wf = pe .Workflow (name = name )
99
102
@@ -122,8 +125,11 @@ def diffeomorphic_tensor_pipeline(name='DiffeoTen',
122
125
# Apply transform
123
126
wf .connect (reslice_node_moving , 'out_file' , apply_xfm_node , 'in_file' )
124
127
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' )
125
131
# Send to output
126
- wf .connect (apply_xfm_node , 'out_file' , outputnode , 'out_file' )
132
+ wf .connect (reslice_node_to_input , 'out_file' , outputnode , 'out_file' )
127
133
wf .connect (compose_xfm_node , 'out_file' , outputnode , 'out_file_xfm' )
128
134
wf .connect (reslice_node_pow2 , 'out_file' , outputnode , 'fixed_resliced' )
129
135
wf .connect (reslice_node_moving , 'out_file' , outputnode , 'moving_resliced' )
0 commit comments