|
ITK
5.2.0
Insight Toolkit
|
Go to the documentation of this file.
18 #ifndef itkVariableSizeMatrix_h
19 #define itkVariableSizeMatrix_h
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"
69 operator+=(
const Self & matrix);
76 operator-=(
const Self & matrix);
83 vnl_matrix<T>
operator*(
const vnl_matrix<T> & matrix)
const;
87 operator*=(
const Self & matrix);
91 operator*=(
const vnl_matrix<T> & matrix);
94 vnl_vector<T>
operator*(
const vnl_vector<T> & vc)
const;
133 return m_Matrix(row, col);
140 return m_Matrix(row, col);
144 inline T *
operator[](
unsigned int i) {
return m_Matrix[i]; }
147 inline const T *
operator[](
unsigned int i)
const {
return m_Matrix[i]; }
150 inline InternalMatrixType &
157 inline const InternalMatrixType &
167 m_Matrix.set_identity();
174 m_Matrix.fill(value);
207 return vnl_matrix_inverse<T>(m_Matrix).as_matrix();
214 return m_Matrix.transpose();
226 : m_Matrix(matrix.m_Matrix)
233 return m_Matrix.rows();
240 return m_Matrix.cols();
247 return m_Matrix.set_size(r, c);
254 template <
typename T>
265 template <
typename T>
269 if ((matrix.
Rows() != this->Rows()) || (matrix.
Cols() != this->Cols()))
276 for (
unsigned int r = 0; r < this->Rows(); r++)
278 for (
unsigned int c = 0; c < this->Cols(); c++)
291 #ifndef ITK_MANUAL_INSTANTIATION
292 # include "itkVariableSizeMatrix.hxx"
const Self & operator=(const Self &matrix)
bool SetSize(unsigned int r, unsigned int c)
VariableSizeMatrix(const Self &matrix)
T & operator()(unsigned int row, unsigned int col)
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
ConstNeighborhoodIterator< TImage > operator-(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
T * operator[](unsigned int i)
bool NotExactlyEquals(const TInput1 &x1, const TInput2 &x2)
void operator/=(const T &value)
A templated class holding a M x N size Matrix.
vnl_matrix< T > GetInverse() const
const InternalMatrixType & GetVnlMatrix() const
const T * operator[](unsigned int i) const
InternalMatrixType m_Matrix
bool operator!=(const Self &matrix) const
InternalMatrixType & GetVnlMatrix()
unsigned int Cols() const
bool operator==(const Index< VDimension > &one, const Index< VDimension > &two)
CovariantVector< T, NVectorDimension > operator*(const T &scalar, const CovariantVector< T, NVectorDimension > &v)
vnl_matrix< double > InternalMatrixType
vnl_matrix< T > GetTranspose() const
Self operator/(const T &value)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
const T & operator()(unsigned int row, unsigned int col) const
Self operator*(const T &value)
ConstNeighborhoodIterator< TImage > operator+(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
Array class with size defined at construction time.
void Fill(const T &value)
const Self & operator=(const vnl_matrix< T > &matrix)
unsigned int Rows() const
void operator*=(const T &value)
bool operator==(const Self &matrix) const