Skip to content

Commit 82312f5

Browse files
committed
Comment out bspline constant_flow
Constant flow raises an error about the interpolation method.
1 parent b8ad9c5 commit 82312f5

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

pathflow_mixmatch/cli.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -143,20 +143,22 @@ def affine_register(im1, im2, iterations=1000, lr=0.01, transform_type='similari
143143

144144
# choose the affine transformation model
145145
if transform_type == 'non_parametric':
146-
transform_args[0]=mov_im_level[0].size
146+
transform_args[0]=mov_im_level[level].size
147147
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
150150
# microarchitectural details
151+
152+
# transform_opts['sigma'] = sigma[level]
151153
transform_opts['sigma'] = (1, 1)
152154

153155
transformation = transforms[transform_type](*transform_args,**transform_opts)
154156

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)
160162

161163
if transform_type in ['similarity', 'affine', 'rigid']:
162164
# initialize the translation with the center of mass of the fixed image

0 commit comments

Comments
 (0)