24 #include "vnl/vnl_matrix_fixed.h"
25 #include "vnl/algo/vnl_matrix_inverse.h"
26 #include "vnl/vnl_transpose.h"
27 #include "vnl/vnl_matrix.h"
28 #include <vnl/algo/vnl_determinant.h>
41 template<
class T,
unsigned int NRows=3,
unsigned int NColumns=3>
113 Self result( *
this );
125 inline const T &
operator()(
unsigned int row,
unsigned int col )
const
149 inline void Fill(
const T & value )
169 for(
unsigned int r=0; r<NRows; r++)
171 for(
unsigned int c=0; c<NColumns; c++ )
207 inline vnl_matrix_fixed<T,NColumns,NRows>
GetInverse(
void )
const
209 if (vnl_determinant(
m_Matrix) == 0.0)
211 itkGenericExceptionMacro(<<
"Singular matrix. Determinant is 0.");
234 template<
class T,
unsigned int NRows,
unsigned int NColumns >
235 ITK_EXPORT std::ostream& operator<<( std::ostream& os, const Matrix<T,NRows,NColumns> & v)
237 os << v.GetVnlMatrix();
245 #define ITK_TEMPLATE_Matrix(_, EXPORT, x, y) namespace itk { \
246 _(3(class EXPORT Matrix< ITK_TEMPLATE_3 x >)) \
247 namespace Templates { typedef Matrix< ITK_TEMPLATE_3 x > Matrix##y; } \
250 #if ITK_TEMPLATE_EXPLICIT
251 # include "Templates/itkMatrix+-.h"