@@ -143,20 +143,22 @@ def affine_register(im1, im2, iterations=1000, lr=0.01, transform_type='similari
143
143
144
144
# choose the affine transformation model
145
145
if transform_type == 'non_parametric' :
146
- transform_args [0 ]= mov_im_level [0 ].size
146
+ transform_args [0 ]= mov_im_level [level ].size
147
147
elif transform_type in ['bspline' ,'wendland' ]:
148
- # for wendland , sigma must be positive tuple of ints
149
- # for wendland , smaller sigma tuple means less loss of
148
+ # for bspline , sigma must be positive tuple of ints
149
+ # for bspline , smaller sigma tuple means less loss of
150
150
# microarchitectural details
151
+
152
+ # transform_opts['sigma'] = sigma[level]
151
153
transform_opts ['sigma' ] = (1 , 1 )
152
154
153
155
transformation = transforms [transform_type ](* transform_args ,** transform_opts )
154
156
155
- if level > 0 and transform_type == 'bspline' :
156
- constant_flow = al .transformation .utils .upsample_displacement (constant_flow ,
157
- mov_im_level .size ,
158
- interpolation = interpolation )
159
- transformation .set_constant_flow (constant_flow )
157
+ # if level > 0 and transform_type=='bspline':
158
+ # constant_flow = al.transformation.utils.upsample_displacement(constant_flow,
159
+ # mov_im_level.size,
160
+ # interpolation=interpolation)
161
+ # transformation.set_constant_flow(constant_flow)
160
162
161
163
if transform_type in ['similarity' , 'affine' , 'rigid' ]:
162
164
# initialize the translation with the center of mass of the fixed image
0 commit comments