18 #ifndef itkSymmetricSecondRankTensor_h
19 #define itkSymmetricSecondRankTensor_h
22 #ifdef SymmetricSecondRankTensor
23 #undef SymmetricSecondRankTensor
74 template<
typename TComponent,
unsigned int NDimension = 3 >
76 FixedArray< TComponent, NDimension *( NDimension + 1 ) / 2 >
84 itkStaticConstMacro(
Dimension,
unsigned int, NDimension);
85 itkStaticConstMacro( InternalDimension,
unsigned int, ( NDimension * ( NDimension + 1 ) / 2 ) );
90 itkGetStaticConstMacro(InternalDimension) >
BaseArray;
114 template<
typename TCoordRepB >
118 typedef ComponentType ComponentArrayType[itkGetStaticConstMacro(InternalDimension)];
124 template<
typename TCoordRepB >
127 BaseArray::operator=(pa);
133 Self & operator=(
const ComponentType & r);
135 Self & operator=(
const ComponentArrayType r);
143 const Self & operator+=(
const Self & vec);
145 const Self & operator-=(
const Self & vec);
148 Self
operator *(
const RealValueType & scalar)
const;
150 Self operator/(
const RealValueType & scalar)
const;
152 const Self & operator*=(
const RealValueType & scalar);
154 const Self & operator/=(
const RealValueType & scalar);
159 return itkGetStaticConstMacro(InternalDimension);
169 ValueType & operator()(
unsigned int row,
unsigned int col);
171 const ValueType & operator()(
unsigned int row,
unsigned int col)
const;
178 AccumulateValueType GetTrace()
const;
181 void ComputeEigenValues(EigenValuesArrayType & eigenValues)
const;
185 void ComputeEigenAnalysis(EigenValuesArrayType & eigenValues,
186 EigenVectorsMatrixType & eigenVectors)
const;
191 template<
typename TMatrixValueType>
193 template<
typename TMatrixValueType>
194 Self Rotate(
const vnl_matrix_fixed<TMatrixValueType, NDimension, NDimension> & m)
const
198 template<
typename TMatrixValueType>
206 MatrixType PreMultiply(
const MatrixType & m)
const;
209 MatrixType PostMultiply(
const MatrixType & m)
const;
219 template<
typename TComponent,
unsigned int NDimension >
223 template<
typename TComponent,
unsigned int NDimension >
230 #ifndef ITK_MANUAL_INSTANTIATION
231 #include "itkSymmetricSecondRankTensor.hxx"
A templated class holding a M x N size Matrix.
Self & operator=(const SymmetricSecondRankTensor< TCoordRepB, NDimension > &pa)
Find Eigen values of a real 2D symmetric matrix. It serves as a thread-safe alternative to the class:...
FixedArray< TComponent, NDimension > EigenValuesArrayType
std::istream InputStreamType
ConstNeighborhoodIterator< TImage > operator-(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
SymmetricSecondRankTensor Self
Represent a symmetric tensor of second rank.
std::istream & operator>>(std::istream &is, Point< T, NPointDimension > &v)
SymmetricSecondRankTensor(const ComponentArrayType r)
NumericTraits< ValueType >::RealType AccumulateValueType
void SetNthComponent(int c, const ComponentType &v)
CovariantVector< T, NVectorDimension > operator*(const T &scalar, const CovariantVector< T, NVectorDimension > &v)
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
std::ostream OutputStreamType
Simulate a standard C array with copy semnatics.
SymmetricSecondRankTensor(const ComponentType &r)
ComponentType GetNthComponent(int c) const
FixedArray< TComponent, itkGetStaticConstMacro(InternalDimension) > BaseArray
SymmetricSecondRankTensor()
ConstNeighborhoodIterator< TImage > operator+(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
Self Rotate(const vnl_matrix_fixed< TMatrixValueType, NDimension, NDimension > &m) const
Matrix< TComponent, NDimension, NDimension > EigenVectorsMatrixType
const unsigned int Dimension
Superclass::ValueType ValueType
NumericTraits< ValueType >::RealType RealValueType
static unsigned int GetNumberOfComponents()
Matrix< TComponent, NDimension, NDimension > MatrixType
SymmetricEigenAnalysis< MatrixType, EigenValuesArrayType, EigenVectorsMatrixType > SymmetricEigenAnalysisType
SymmetricSecondRankTensor(const SymmetricSecondRankTensor< TCoordRepB, NDimension > &pa)
Self Rotate(const vnl_matrix< TMatrixValueType > &m) const