[Insight-users] Controlling optimizer search space

Poirier, Guillaume Guillaume.Poirier at nrc-cnrc.gc.ca
Mon Jan 26 15:00:31 EST 2009


Hello,

I am fairly new to ITK so I apologize in advance for this question...

I am using an AffineTransform to perform image registration. I know 
for example that the rotation I am looking for will be between -10
and 10 degrees. For a specific test, it is about one degree.

I initialize the transform like this:

// set initial transform matrix to identity and rotation center to image center
typedef itk::CenteredTransformInitializer< TransformType, FixedImageType, MovingImageType >  TransformInitializerType;
typename TransformInitializerType::Pointer initializer = TransformInitializerType::New();
initializer->SetTransform( transform );
initializer->SetFixedImage( fixedImageReader->GetOutput() );
initializer->SetMovingImage( movingImageReader->GetOutput() );
initializer->GeometryOn();
initializer->InitializeTransform();
typename RegistrationType::ParametersType initialParameters = transform->GetParameters();
initialParameters[0] = 1.0;
initialParameters[1] = 0.0;
initialParameters[2] = 0.0;
initialParameters[3] = 1.0;
registration->SetInitialTransformParameters( initialParameters );

Now when I run this, the first iteration of the registration process yields:

Using initial center of rotation: (1751.5, 1167.5)
Using initial translation: (0, 0)
Using initial scale 1: 1
Using initial scale 2: 1
Using initial angle (degrees): 0

Registration iterations:
0    = -0.6493 : [1.05913, 0.261505, -0.394698, 1.10742, -0.00464574, -0.103787]
 Affine angle: -16.8505

Now I wonder why it is -16.8505 degrees initially... I'd like to start at 0 degrees and look
in a range of -10 to 10. Is there a way to achieve this ?

Thanks in advance !


guillaume

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090126/9a056fbe/attachment.htm>


More information about the Insight-users mailing list