MantisBT - ITK | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0008320 | ITK | public | 2008-12-18 22:15 | 2011-06-09 01:45 | |
Reporter | Hans Johnson | ||||
Assigned To | brian avants | ||||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | ITK-3-10 | ||||
Target Version | Fixed in Version | ||||
Resolution Date | |||||
Sprint | |||||
Sprint Status | completed | ||||
Summary | 0008320: Rigid3DTransform not setting state variables consistently | ||||
Description | The two methods of setting the translation of a Rigid3DTransform do not produce a consistent internal state. This is particularly problematic because when the SetTranslation() is used, it produces a rigid transformation that will work, but when the GetParameters() call is made imediatly after the SetTranslation call, it reports a zero translation in the parameters. The is catostrophic because writing transforms out to disk depends on the GetParameters calls. The problem arises from inconsistent conversions between the m_Offset and the m_Translation internal variables. | ||||
Steps To Reproduce | |||||
Additional Information | "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; itk::Matrix<double, 3, 3> R=ZeroCenteredTransform->GetRotationMatrix(); itk::Vector< double, 3> T; T[0]=100;T[1]=200;T[2]=300; itk::Rigid3DTransform<double>::Pointer r1=itk::Rigid3DTransform<double>::New(); r1->SetRotationMatrix( R ); r1->Translate( T ); itk::Rigid3DTransform<double>::ParametersType p1; p1.set_size(12); p1=r1->GetParameters(); std::cout << "r1\n" << r1 << std::endl; itk::Rigid3DTransform<double>::Pointer r2=itk::Rigid3DTransform<double>::New(); itk::Rigid3DTransform<double>::ParametersType p2; p2.set_size(12); for(int r=0;r<3;r++) { for(int c=0;c<3;c++) { p2[r*3+c]=R[r][c]; } } p2[ 9]=T[0]; p2[10]=T[1]; p2[11]=T[2]; r2->SetParameters( p2 ); std::cout << "r2\n" << r2 << std::endl; itk::Rigid3DTransform<double>::Pointer r3=itk::Rigid3DTransform<double>::New(); r3->SetFixedParameters( r1->GetFixedParameters() ); r3->SetParameters( r1->GetParameters() ); std::cout << "r3\n" << r3 << std::endl; itk::Rigid3DTransform<double>::ParametersType p3; p3.set_size(12); p3=r3->GetParameters(); std::cout << p1 << "\n" << p2 << "\n" << p3 << std::endl; std::cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! r1 Rigid3DTransform (0x56c670) RTTI typeinfo: itk::Rigid3DTransform<double> Reference Count: 2 Modified Time: 32843 Debug: Off Observers: none Matrix: 0.99761 0.05864 0.036553 -0.0657556 0.968201 0.241377 -0.0212363 -0.243204 0.969743 Offset: [100, 200, 300] Center: [0, 0, 0] Translation: [0, 0, 0] Inverse: 0.99761 -0.0657556 -0.0212363 0.05864 0.968201 -0.243204 0.036553 0.241377 0.969743 Singular: 0 r2 Rigid3DTransform (0x56c940) RTTI typeinfo: itk::Rigid3DTransform<double> Reference Count: 2 Modified Time: 32847 Debug: Off Observers: none Matrix: 0.99761 0.05864 0.036553 -0.0657556 0.968201 0.241377 -0.0212363 -0.243204 0.969743 Offset: [100, 200, 300] Center: [0, 0, 0] Translation: [100, 200, 300] Inverse: 0.99761 -0.0657556 -0.0212363 0.05864 0.968201 -0.243204 0.036553 0.241377 0.969743 Singular: 0 r3 Rigid3DTransform (0x56ccd0) RTTI typeinfo: itk::Rigid3DTransform<double> Reference Count: 2 Modified Time: 32852 Debug: Off Observers: none Matrix: 0.99761 0.05864 0.036553 -0.0657556 0.968201 0.241377 -0.0212363 -0.243204 0.969743 Offset: [0, 0, 0] Center: [0, 0, 0] Translation: [0, 0, 0] Inverse: 0.99761 -0.0657556 -0.0212363 0.05864 0.968201 -0.243204 0.036553 0.241377 0.969743 Singular: 0 [0.99761, 0.05864, 0.036553, -0.0657556, 0.968201, 0.241377, -0.0212363, -0.243204, 0.969743, 0, 0, 0] [0.99761, 0.05864, 0.036553, -0.0657556, 0.968201, 0.241377, -0.0212363, -0.243204, 0.969743, 100, 200, 300] [0.99761, 0.05864, 0.036553, -0.0657556, 0.968201, 0.241377, -0.0212363, -0.243204, 0.969743, 0, 0, 0] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2008-12-18 22:15 | Hans Johnson | New Issue | |||
2008-12-18 23:52 | Hans Johnson | Note Added: 0014405 | |||
2008-12-19 10:55 | Hans Johnson | Note Added: 0014408 | |||
2008-12-26 13:10 | Luis Ibanez | Note Added: 0014443 | |||
2009-03-10 19:59 | Hans Johnson | Status | new => assigned | ||
2009-03-10 19:59 | Hans Johnson | Assigned To | => Luis Ibanez | ||
2010-11-07 01:29 | Luis Ibanez | Note Added: 0022974 | |||
2010-11-07 01:29 | Luis Ibanez | Assigned To | Luis Ibanez => brian avants | ||
2011-06-09 01:45 | Cory W Quammen | Sprint Status | => completed | ||
2011-06-09 01:45 | Cory W Quammen | Note Added: 0026791 | |||
2011-06-09 01:45 | Cory W Quammen | Status | assigned => closed | ||
2011-06-09 01:45 | Cory W Quammen | Resolution | open => fixed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|