[Insight-users] 2D multi resolution registration

Lydia Ng lng@insightful.com
Mon, 14 Apr 2003 12:09:28 -0700


Armel,

In the past, sometimes I have found it necessary to use different
optimizer settings at each resolution level. Have you tried playing
around with SetMaximumStepLength and SetMinimumStepLength?

If you are getting non-sense (i.e. parameter values which are way off)
it might mean that you might need to reduce the initial step size by way
of reducing the MaximumStepLength.

The software guide gives examples of how to trace out the parameters of
the optimization (section 7.3) and how to connect up an itk::Command to
give you an opportunity to change optimizer setting between levels.

Hope this helps.
Lydia

> -----Original Message-----
> From: Armel.Rosselet@varian.com [mailto:Armel.Rosselet@varian.com]
> Sent: Monday, April 14, 2003 6:52 AM
> To: insight-users@public.kitware.com
> Subject: [Insight-users] 2D multi resolution registration
>=20
> Hi,
>=20
> I have a question regarding the
MultiResolutionImageRegistrationMethod,
> which I tried to use for a 2D registration problem
>=20
> I followed the code example "Hello World Registration" in the ITK
Software
> Guide.
> The components I use are:
> - TranslationTransform
> - RegularStepGradientDescentOptimizer
> - NormalizedCorrelationImageToImageMetric
> - LinearInterpolateImageFunction
> - ImageRegistrationMethod (later:
MultiResolutionImageRegistrationMethod)
>=20
> The fixed image has a size of 512 x 384, the moving image: 244 x 321.
>=20
> Both the fixed and moving image contain very simple objects of the
same
> size and shape. As expected the registration process was
straightforward
> and precise.
>=20
> BUT... when I tried to speed up the process using the multi-resolution
> registration, I got a problem, which I could not solve until now:
>=20
> I experimented with two (fixed and moving) standard pyramids (with the
> schedule 8,8,4,4,2,2,1,1). First everything seemed to be OK. But then
I
> saw
> that the first two levels (8 and 4) are skipped. I.e. no optimization
is
> done there. The following if-statement (line 184) in the file
> itkRegularStepGradientDescentBaseOptimizer.cxx stops the process at
the
> very beginning:
>=20
>   if( gradientMagnitude < m_GradientMagnitudeTolerance )
>   {
>     m_StopCondition =3D GradientMagnitudeTolerance;
>     StopOptimization();
>     return;
>   }
>=20
> the user has no influence on m_GradientMagnitudeTolerance, because
it's
> hard-coded but by
> setting the optimizer scales to an other value I could enforce the
> registration process for the first two levels.
>         itk::RegularStepGradientDescentOptimizer::ScalesType
>                         optimizerScales( Dimension );
>         optimizerScales[0] =3D 1.0/32.0;
>         optimizerScales[1] =3D 1.0/32.0;
>         optimizer->SetScales( optimizerScales );
>=20
> But then I had an other (maybe related) problem: the result of the
first
> level (scale factor 8) was nonsense, although the images are still
large
> and structured enough for an easy registration. To prove that the
> registration still should work, I scaled down the original images
myself
> by
> a factor of 8 and used the normal ImageRegistrationMethod... with
> absolutely no problem (and of course very fast).
>=20
> Somehow the problem seems to be connected to the spacing values of the
> pyramid levels (which are 8,4,2, and 1). When I tried to set them all
to
> 1,
> it seemed to work better, but this is of course a mere hack and the
> framework somehow resets the spacing to the old values.
>=20
> I also did some experiments by using the Pyramid Output(i) myself (at
the
> different levels i of the pyramid) but actually got the same trouble
>=20
> So, is this a known problem in 2D registration or am I setting it up
the
> wrong way ?
>=20
> Thanks for any answer !!!
>=20
> Armel
>=20
>=20
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users