[Insight-users] 3D rigid registration
Atwood, Robert C
r.atwood at imperial.ac.uk
Mon Jun 5 11:50:48 EDT 2006
Dear Grace:
I have used the Centred Transform Initializer in some code that used
VersoRigid3DTransform and it has given me the results I expected. Here
are a few lines out of the code. If I am using it incorrectly I hope
some one else will let me know before I get bad results.
Don't forget to use the special optimizer for this transform.
Hope it helps,
Robert
.....
#include "itkCenteredTransformInitializer.h"
#include "itkVersorRigid3DTransform.h"
#include "itkVersorRigid3DTransformOptimizer.h"
......
//Transform, optimizer and metric used for the registration
typedef itk::VersorRigid3DTransform< double > TransformType;
typedef itk::VersorRigid3DTransformOptimizer OptimizerType;
/* initializer, this automatically finds the centers of each image */
typedef itk::CenteredTransformInitializer< TransformType, ImageType,
ImageType > TransformInitializerType;
.....
TransformInitializerType::Pointer initializer =
TransformInitializerType::New();
.....
// fshrinker and mshrinker are already Updated at this point
/* set up the defaults in any case */
initializer->SetTransform( transform );
initializer->SetFixedImage( fshrinker->GetOutput() );
initializer->SetMovingImage( mshrinker->GetOutput() );
initializer->MomentsOn();
/* this actually does the initialization using the above
parameters */
initializer->InitializeTransform();
-----Original Message-----
From: insight-users-bounces+r.atwood=imperial.ac.uk at itk.org
[mailto:insight-users-bounces+r.atwood=imperial.ac.uk at itk.org] On Behalf
Of Grace Chen
Sent: 05 June 2006 15:51
To: insight-users at itk.org
Subject: [Insight-users] 3D rigid registration
Hi there,
To use VersorRigid3DTransform for 3D rigid registration, should we
center
both of the input imgaes? It seems wrong to center both images.....If
we
need to center just one image, which one, the fixed image or the moving
image??
Please help! This part of using ITK can't seem to be found anywhere....
Thanx!
Grace
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list