24 #include <vxl_version.h> 25 #if VXL_VERSION_DATE_FULL < 20160229 26 #include "vnl/vnl_matrix_fixed.txx" 28 #include "vnl/vnl_matrix_fixed.hxx" 30 #include "vnl/vnl_transpose.h" 31 #include "vnl/algo/vnl_matrix_inverse.h" 32 #include "vnl/vnl_matrix.h" 33 #include "vnl/algo/vnl_determinant.h" 52 template<
typename T,
unsigned int NRows = 3,
unsigned int NColumns = 3 >
86 vnl_vector_fixed<T,NRows>
operator *(
const vnl_vector_fixed< T, NColumns > & vector)
const;
89 Self
operator *(
const CompatibleSquareMatrixType & matrix)
const;
91 template<
unsigned int OuterDim>
99 Self
operator+(
const Self & matrix)
const;
104 Self
operator-(
const Self & matrix)
const;
109 vnl_matrix< T >
operator *(
const vnl_matrix< T > & matrix)
const;
112 void operator*=(
const CompatibleSquareMatrixType & matrix);
115 void operator*=(
const vnl_matrix< T > & matrix);
118 vnl_vector< T >
operator *(
const vnl_vector< T > & matrix)
const;
155 inline const T &
operator()(
unsigned int row,
unsigned int col)
const 191 inline void Fill(
const T & value)
197 inline const Self &
operator=(
const vnl_matrix< T > & matrix)
204 inline Matrix(
const vnl_matrix< T > & matrix)
214 for (
unsigned int r = 0; r < NRows; r++ )
216 for (
unsigned int c = 0; c < NColumns; c++ )
233 inline const Self &
operator=(
const InternalMatrixType & matrix)
240 inline explicit Matrix(
const InternalMatrixType & matrix)
253 inline vnl_matrix_fixed< T, NColumns, NRows >
GetInverse(
void)
const 255 if ( vnl_determinant(
m_Matrix) == 0.0 )
257 itkGenericExceptionMacro(<<
"Singular matrix. Determinant is 0.");
259 vnl_matrix< T > temp = vnl_matrix_inverse< T >(
m_Matrix);
280 template<
typename T,
unsigned int NRows,
unsigned int NColumns >
281 std::ostream & operator<<(std::ostream & os, const Matrix< T, NRows, NColumns > & v)
283 os << v.GetVnlMatrix();
288 #ifndef ITK_MANUAL_INSTANTIATION 289 #include "itkMatrix.hxx" const Self & operator=(const vnl_matrix< T > &matrix)
const Self & operator=(const InternalMatrixType &matrix)
A templated class holding a M x N size Matrix.
void operator*=(const T &value)
Matrix(const Self &matrix)
Self operator-(const Self &matrix) const
bool operator!=(const Self &matrix) const
vnl_matrix_fixed< T, NColumns, NRows > GetInverse(void) const
T & operator()(unsigned int row, unsigned int col)
vnl_matrix_fixed< T, NRows, NColumns > InternalMatrixType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
const InternalMatrixType & GetVnlMatrix(void) const
InternalMatrixType m_Matrix
Self operator*(const T &value) const
Vector< T, NRows > operator*(const Vector< T, NColumns > &vector) const
const Self & operator+=(const Self &matrix)
Matrix(const InternalMatrixType &matrix)
Matrix< T, NColumns, NColumns > CompatibleSquareMatrixType
const T & operator()(unsigned int row, unsigned int col) const
const Self & operator=(const Self &matrix)
vnl_matrix_fixed< T, NColumns, NRows > GetTranspose(void) const
Matrix< T, NRows, OuterDim > operator*(const vnl_matrix_fixed< T, NRows, OuterDim > &matrix) const
T * operator[](unsigned int i)
A templated class holding a n-Dimensional vector.
bool operator==(const Self &matrix) const
void operator*=(const CompatibleSquareMatrixType &matrix)
const Self & operator-=(const Self &matrix)
static const unsigned int ColumnDimensions
Self operator/(const T &value) const
bool NotExactlyEquals(const TInput1 &x1, const TInput2 &x2)
InternalMatrixType & GetVnlMatrix(void)
static const unsigned int RowDimensions
void Fill(const T &value)
Matrix(const vnl_matrix< T > &matrix)
Self operator+(const Self &matrix) const
Define additional traits for native types such as int or float.
A templated class holding a geometric point in n-Dimensional space.
A templated class holding a n-Dimensional covariant vector.
const T * operator[](unsigned int i) const
void operator/=(const T &value)