[Insight-users] initialize VersorRigid3DTransform
Dean Inglis
dean.inglis at camris.ca
Sat Oct 22 12:44:12 EDT 2011
how can I initialize a VersorRigid3DTransform for a point set
to image registration problem using the following information:
1) center of the moving points, c
2) principal axes of the moving points, e1, e2, e3
3) center of the image calculated using the ImageMomentsCalculator, cofg
4) principal axes of the image calculated using the ImageMomentsCalculator,
p1, p2, p3
where all variables above are double arrays of size 3? Bascally, I would
like
to be able to initialize the transform:
ParametersType parameters( transform->GetNumberOfParameters() );
// Versor type
typedef TransformType::VersorType VersorType;
VersorType versor;
parameters[0] = versor.GetX(); // Rotations
parameters[1] = versor.GetY();
parameters[2] = versor.GetZ();
parameters[3] = 0.0; // Translations
parameters[4] = 0.0;
parameters[5] = 0.0;
transform->SetParameters( parameters );
but I dont know how the rotations should be initialized. I could calculate
a 3x3 rotation
matrix :
A = e * p
where e = {e1,e2,e3} and p = {p1,p2,p3} but how could that be used to
initialize the
transform?
Dean
More information about the Insight-users
mailing list