[Insight-users] changing components in iteration of itkMultiResolutionImageRegistrationMethod

Dan Rizzo gdangit at gmail.com
Thu Oct 26 16:58:46 EDT 2006


Hello

I am trying to register two 2D images with some offset and rotation.

Section 8.7.1 of the Software Guide shows how to change parameters for the
Optimizer in between iterations of the multi resolution registration
framework.  It also mentions that you could even swap out components between
levels.  This is where I'm having trouble.

I'd like the first resolution registration to perform the Translation
transform, and the second to do an Affine transform.  The idea here is to
use a Gradient Descent optimizer for each, and the
MeanSquaresImageToImageMetric for both as well.   Later I should be able to
switch these components in between resolutions as well.  I was planning on
trying Mattes MI with a OnePlusOne for the first stage.

Is there some pattern I need to follow in my Command Observer class to
switch components?  I have gone ahead and set the registration's transform
to the new object using SetTransform().  I created a new Optimizer and set
the parameters accordingly.  I tried then calling Update() on the
registration.

When the program gets to the second resolution, I get the error message "The
size of Scales is 6, but the NumberOfParameters for the CostFunction is 2."
coming out of the RegularStepGradientDescentOptimizer.  The first level had
only 2 parameters as the transform was a translation, and the second had 6
for affine.

Is there an example somewhere which actually does switch components in
between resolutions, or does anyone know what I'm doing / not doing?

Thanks in advance!

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20061026/44f7668e/attachment.html


More information about the Insight-users mailing list