23 #include "vnl/vnl_matrix_fixed.h"
24 #include "vnl/algo/vnl_matrix_inverse.h"
25 #include "vnl/vnl_transpose.h"
26 #include "vnl/vnl_matrix.h"
27 #include "vnl/algo/vnl_determinant.h"
45 template<
class T,
unsigned int NRows = 3,
unsigned int NColumns = 3 >
139 inline const T &
operator()(
unsigned int row,
unsigned int col)
const
175 inline void Fill(
const T & value)
198 for (
unsigned int r = 0; r < NRows; r++ )
200 for (
unsigned int c = 0; c < NColumns; c++ )
237 inline vnl_matrix_fixed< T, NColumns, NRows >
GetInverse(
void)
const
239 if ( vnl_determinant(
m_Matrix) == 0.0 )
241 itkGenericExceptionMacro(<<
"Singular matrix. Determinant is 0.");
263 template<
class T,
unsigned int NRows,
unsigned int NColumns >
264 ITK_EXPORT std::ostream & operator<<(std::ostream & os, const Matrix< T, NRows, NColumns > & v)
266 os << v.GetVnlMatrix();
272 #define ITK_TEMPLATE_Matrix(_, EXPORT, TypeX, TypeY) \
275 _( 3 ( class EXPORT Matrix< ITK_TEMPLATE_3 TypeX > ) ) \
276 namespace Templates \
278 typedef Matrix< ITK_TEMPLATE_3 TypeX > Matrix##TypeY; \
282 #if ITK_TEMPLATE_EXPLICIT
283 #include "Templates/itkMatrix+-.h"
287 #include "itkMatrix.hxx"