Hi Jochen, 

Thanks for the suggestion! I missed noticing that this class inherits from 
itk::Rigid3DTransform. 

Would it be possible to replace the itk:Rigid3DTransform typdef with 
itk::QuaternionRigidTransform in mitkNavigationDataTransformFilter? This way 
the constrained tolerance in the Rigid3DTransform::SetMatrix() method would be 
eliminated. Could be helpful to users who are not so familiar with ITK with set 
methods for both quaternions and matrices. 


Best Regards, 

-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 




From: "Neuhaus Jochen" <[email protected]> 
To: "Keshav Chintamani" <[email protected]>, "mitk-users" 
<[email protected]> 
Sent: Monday, 25 October, 2010 1:18:31 PM 
Subject: AW: [mitk-users] Problem with mitkNavigationDataTransformFilter 




Hi Keshav, 

You could try to use an itk::QuaternionRigidTransform ( 
http://www.itk.org/Doxygen318/html/classitk_1_1QuaternionRigidTransform.html ) 
instead. 



Regards, 

Jochen 




-------------- 
MSc. Jochen Neuhaus 
Deutsches Krebsforschungszentrum 
Div. Medical and Biological Informatics (E130) 
Im Neuenheimer Feld 280 
D-69120 Heidelberg, Germany 

Email: [email protected] 
Phone: (+49) 6221/42-3553 
Fax: (+49) 6221/42-2345 
http://www.dkfz-heidelberg.de/de/mbi/people/Jochen_Neuhaus.html 






Von: Keshav Chintamani [mailto:[email protected]] 
Gesendet: Samstag, 23. Oktober 2010 13:49 
An: mitk-users 
Betreff: [mitk-users] Problem with mitkNavigationDataTransformFilter 





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