[Insight-users] Re: Registration

Luis Ibanez luis.ibanez@kitware.com
Fri, 31 Jan 2003 09:05:00 -0500


Hi  Ramakrishna.

The first thing that can help you is to use the
CenteredRigid2DTransform instead of the AffineTransform.

Please take a look at the Examples:

Insight/Examples/Registration

- ImageRegistration5.cxx
- ImageRegistration6.cxx

The second also illustrate how to initialize the
CenteredRigid2DTransform usin the CenteredTransformInitializer
class.

These two examples are described in the SoftwareGuide
on sections: 7.4.3 and 7.4.4 (PDF pages 186 ~ 190).

--

The other setup you may want to change is the scale for
translations. In your use of the affine transform, you are
passing the same scale for the rotation Matrix elements and
the translation elements.  Translations scales should be at
least 1/100 of the matrix scales. Otherwise the optimizer
will make long steps in the rotational components and make
the process unstable.

When you start using the CenteredRigid2D Transform, the
first parameter is the angle (in radians). So the other
four parameters will also need scales of about 1/100 to
1/1000.


You could use the ImageRegistration5 and ImageRegistration6
examples directly to experiment registering your images.
Just need to convert them to PNG, DICOM, MetaImage, Analyze,
Gipl, Vol or VTK format so they can be read by the example.

BTW if your dataset is 256 x 256 x 1 this is a 2D problem,
not 3D, make sure that you instantiate all the classes in
dimension 2.



Please let us know if you find further problems.


   Thanks


     Luis



-------------------------------------

nedunuri ramakrishna wrote:

> Dear Mr.Luis,
> 
> I am working on registration.
> 	I could trace the registration process using the
> "itkcommand.h".
> My moving image is generated from fixed image by
> rotating in 2 degrees.
> 
> Optimizer parameters are:
>  optimizer->SetNumberOfIterations(   1000   );
>  optimizerScales[0] = 1.0; // scale for M11
>  optimizerScales[1] = 1.0; // scale for M12
>  optimizerScales[2] = 1.0; // scale for M21
>  optimizerScales[3] = 1.0; // scale for M22
>  optimizerScales[4] = 1.0  // scale for translation on
> Y
>  optimizerScales[5] = 1.0  // scale for translation on
> Z
> 
> When i displayed the iterations  of the optimizer
> using optimizer->GetCurrentIteration(),i observed that
> registration process is stopping at '7'
> iteration.After 7 th iteration regisrtation process
> stopped and matrix is diaplayed.
> I could not get the expected output.
> I think Sin(2) means,I should get the  0.03489 in the
> rotation matrix.
> But,I am getting
> Metric value: -0.934061
> 
> 1.0002, -0.00145522, -0.00155741, 0.999049
> 
> translation in X: 2.76434
> translation in y: -8.34538
> 
> My dataaset is of size 256X256X1.
> Affinetransfrom gave only 6 parameters.
> 
> Please suggest me why it is happening so.What should i
> do to get the expected output.
> 
> Thanks in advance,
> 
> Regards,
>  
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> 
>