[Insight-users] RegularStepGradientDescentBaseOptimizer::AdvanceOneStep problem

Elena Pavlovskaia elena.pavlovskaia at otismed.com
Mon Feb 5 19:07:13 EST 2007


Hi,

I am using vvITKImageRegistration.cxx plugin (actually my small modification
of it). Though in many cases it works fine, sometimes it produces a totally
wrong result. I think that the wrong results are due to a bug in
RegularStepGradientDescentBaseOptimizer::AdvanceOneStep.

I observed that in cases with wrong result the Registration process
converges
well to a desired solution during several optimization steps, yet at a
certain
(seemingly random) step it jumps by a huge amount to a very wrong location
(transform). Later it converges to the local minimum close to the wrong
location where it jumped.

Here are the details on how the jump happens.

My images have the size of 100 units. So I set the optimizerScales to 1.0
for
the "angle" parameters and to 0.001 for the "translation" parameters in the
plugin.

At the moment of a "jump" the computed m_Gradient in
RegularStepGradientDescentBaseOptimizer has almost zero "translation"
components and far-from-zero "angle" component(s). Let m_Gradient for
simplicity be {1.0, 0.0, 0.0, ...} with the only 1.0 in the "angle"
component.
Let also m_CurrentStepLength be 1.0, which is initial setting in the
vvITKImageRegistration.
The AdvanceOneStep computes then
	transformedGradient = m_Gradient;
	gradientMagnitude = 1.0;
	factor = -1.0;

Finally the
  this->StepAlongGradient( factor, transformedGradient );
rotates the image by 1 radian, which is a huge jump.

I don't know what would be a good fix for this problem. Locally I fixed it
by
modifying the code in TWO places: in
RegularStepGradientDescentBaseOptimizer::AdvanceOneStep and in
ImageRegistration plugin.

In AdvanceOneStep I made the following change: I compute the
gradientMagnitude
of the m_Gradient rather then of the transformedGradient.

In the ImageRegistration plugin I made sure that all optimizerScales are
higher then 1.0. In my case the "angle" scales are 50.0 (= "radius" of my
images) and the "translation"
scales are 1.0.

With the above changes the registration works fine for me.

Thanks,

Elena



More information about the Insight-users mailing list