Hello, 

I am using the mitkIGT module and am having some trouble using the 
mitkNavigationDataTransformFilter. 

I calculated the rotation matrix (3x3) between two NavigationData objects from 
their quaternions using vnl and tried to set the matrix using the following 
method: 


typedef itk::Rigid3DTransform<float> itkRigid3DTransformType; 

itkRigid3DTransformType::Pointer 
itkRigidTransformTest=itkRigid3DTransformType::New(); 

itk::Matrix<mitk::ScalarType,3,3> testRigidMatrix; 

for(unsigned int i=0;i<3;i++) 
{ 
for(unsigned int j=0; j<3; j++) 
{ 
testRigidMatrix[i][j]=vM3.get(i,j); //Copying values from vnl matrix (float) to 
itk matrix (float) (temporary fix) 
} 
} 

itkRigidTransformTest->SetIdentity(); 
itkRigidTransformTest->SetRotationMatrix(testRigidMatrix); // Exception is 
caught here 
itkRigidTransformTest->Modified(); 

mitk::NavigationDataTransformFilter::Pointer 
transformFilter=mitk::mitk::NavigationDataTransformFilter::New(); 
transformFilter ->SetRigid3DTransform( itkRigidTransformTest ) 


The problem is that my rotation matrix is orthogonal with a tolerance of 1e-4 
but the itk::Rigid3DTransform class has a hard coded error tolerance 
requirement of 1e-10 in the SetMatrix() function: 

// Directly set the rotation matrix 
template<class TScalarType> 
void 
Rigid3DTransform<TScalarType> 
::SetMatri const MatrixType & matrix ) 
{ 
const double tolerance = 1e-10; 
if( !this->MatrixIsOrthogonal( matrix, tolerance ) ) 
{ 
itkExceptionMacro( << "Attempting to set a non-orthogonal rotation matrix" ); 
} 

this->Superclass::SetMatri matrix ); 
} 

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


Any suggestions are greatly appreciated! 


-Keshav 

Keshav Chintamani, 
Systems Engineer 
Space Applications Services NV 
Leuvensesteenweg 325 
1932 Zaventem 
Belgium 
Tel: +32 2 721 54 84 Fax: +32 2 721 54 44 
URL: http://www.spaceapplications.com 



------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to