[Insight-users] Non-orthogonal matrix error using VersorRigid3DTransform
Sundaresan Raman
ramansu at cse.ohio-state.edu
Thu Nov 11 14:17:10 EST 2010
Hello,
I'm using VersorRigid3DTransform in ResampleImageFilter to rotate and
translate a 3D volume using ITK 3.16. I set the rotation matrix by hand to
orthonormal vectors and I get the error that the matrix is non-orthogonal as
follows:
itkRigid3DTransform.txx:99:
itk::ERROR: VersorRigid3DTransform(0x1441c240): Attempting to set a
non-orthogonal rotation matrix
Aborted
The set of orthonormal vectors I use are e1, e2 and e3 as follows:
vnl_vector<double> e1(3), e2(3), e3(3);
e1[0]= sqrt(2.0/3.0); e1[1]=-1.0/sqrt(6.0); e1[2]=-1.0/sqrt(6.0);
e2[0]= 0.0; e2[1]=1.0/2.0; e2[2]=-1.0/2.0;
e3[0]=1.0/sqrt(3.0); e3[1]=1.0/sqrt(3.0); e3[2]=1.0/sqrt(3.0);
itk::VersorRigid3DTransform<double>::MatrixType matr;
matr(0,0)=e1[0]; matr(0,1)=e1[1];matr(0,2)=e1[2];
matr(1,0)=e2[0]; matr(1,1)=e2[1];matr(1,2)=e2[2];
matr(2,0)=e3[0]; matr(2,1)=e3[1];matr(2,2)=e3[2];
cout << "Rot " << matr << endl;
transform->SetMatrix(matr);
Rot:
0.816497 -0.408248 -0.408248
0 0.5 -0.5
0.57735 0.57735 0.57735
The error seems to be due to the tolerance which is hardcoded as e-10 in
itkRigid3DTransform.txx
Can anyone suggest me a solution to this problem?
Thanks,
Sundar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101111/3cd95181/attachment.htm>
More information about the Insight-users
mailing list