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 static constexpr
unsigned int Dimension = NDimension;
85 static constexpr
unsigned int InternalDimension = NDimension * ( NDimension + 1 ) / 2;
89 Self::InternalDimension >;
119 template<
typename TCoordRepB >
129 template<
typename TCoordRepB >
132 BaseArray::operator=(pa);
138 Self & operator=(
const ComponentType & r);
140 Self & operator=(
const ComponentArrayType r);
148 const Self & operator+=(
const Self & vec);
150 const Self & operator-=(
const Self & vec);
153 Self
operator *(
const RealValueType & scalar)
const;
155 Self operator/(
const RealValueType & scalar)
const;
157 const Self & operator*=(
const RealValueType & scalar);
159 const Self & operator/=(
const RealValueType & scalar);
164 return Self::InternalDimension;
174 ValueType & operator()(
unsigned int row,
unsigned int col);
176 const ValueType & operator()(
unsigned int row,
unsigned int col)
const;
183 AccumulateValueType GetTrace()
const;
186 void ComputeEigenValues(EigenValuesArrayType & eigenValues)
const;
190 void ComputeEigenAnalysis(EigenValuesArrayType & eigenValues,
191 EigenVectorsMatrixType & eigenVectors)
const;
196 template<
typename TMatrixValueType>
198 template<
typename TMatrixValueType>
199 Self Rotate(
const vnl_matrix_fixed<TMatrixValueType, NDimension, NDimension> & m)
const
203 template<
typename TMatrixValueType>
211 MatrixType PreMultiply(
const MatrixType & m)
const;
214 MatrixType PostMultiply(
const MatrixType & m)
const;
224 template<
typename TComponent,
unsigned int NDimension >
228 template<
typename TComponent,
unsigned int NDimension >
241 #ifndef ITK_MANUAL_INSTANTIATION
242 #include "itkSymmetricSecondRankTensor.hxx"
void swap(FixedArray &other)
A templated class holding a M x N size Matrix.
Self & operator=(const SymmetricSecondRankTensor< TCoordRepB, NDimension > &pa)
typename NumericTraits< ValueType >::RealType AccumulateValueType
ConstNeighborhoodIterator< TImage > operator-(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
Define numeric traits for std::vector.
Represent a symmetric tensor of second rank.
std::istream & operator>>(std::istream &is, Point< T, NPointDimension > &v)
SymmetricSecondRankTensor(const ComponentArrayType r)
void SetNthComponent(int c, const ComponentType &v)
typename NumericTraits< ValueType >::RealType RealValueType
CovariantVector< T, NVectorDimension > operator*(const T &scalar, const CovariantVector< T, NVectorDimension > &v)
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
constexpr unsigned int Dimension
Simulate a standard C array with copy semnatics.
std::ostream OutputStreamType
SymmetricSecondRankTensor(const ComponentType &r)
void swap(Array< T > &a, Array< T > &b)
ComponentType GetNthComponent(int c) const
SymmetricSecondRankTensor()
ConstNeighborhoodIterator< TImage > operator+(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
std::istream InputStreamType
Self Rotate(const vnl_matrix_fixed< TMatrixValueType, NDimension, NDimension > &m) const
static unsigned int GetNumberOfComponents()
SymmetricSecondRankTensor(const SymmetricSecondRankTensor< TCoordRepB, NDimension > &pa)
Self Rotate(const vnl_matrix< TMatrixValueType > &m) const