1 #ifndef __cpPlugins__DataObjects__OrthoNormalBase__hxx__
2 #define __cpPlugins__DataObjects__OrthoNormalBase__hxx__
4 #include <vtkMatrix4x4.h>
6 // -------------------------------------------------------------------------
7 template< class _TMatrix >
8 void cpPlugins::DataObjects::OrthoNormalBase::
9 SetITK( const _TMatrix& m )
11 vtkMatrix4x4* matrix = vtkMatrix4x4::New( );
13 for( unsigned int i = 0; i < 4; ++i )
14 if( i < _TMatrix::RowDimensions )
15 for( unsigned int j = 0; j < 4; ++j )
16 if( j < _TMatrix::ColumnDimensions )
17 matrix->SetElement( i, j, m[ i ][ j ] );
21 // -------------------------------------------------------------------------
22 template< class _TMatrix, class _TVector >
23 void cpPlugins::DataObjects::OrthoNormalBase::
24 SetITK( const _TMatrix& m, const _TVector& v )
26 vtkMatrix4x4* matrix = vtkMatrix4x4::New( );
28 for( unsigned int i = 0; i < 3; ++i )
29 if( i < _TMatrix::RowDimensions )
30 for( unsigned int j = 0; j < 3; ++j )
31 if( j < _TMatrix::ColumnDimensions )
32 matrix->SetElement( i, j, m[ i ][ j ] );
33 for( unsigned int i = 0; i < 3; ++i )
34 if( i < _TVector::Dimension )
35 matrix->SetElement( i, 3, v[ i ] );
39 #endif // __cpPlugins__DataObjects__OrthoNormalBase__hxx__