18 #ifndef itkQuadEdgeMeshDecimationQuadricElementHelper_h
19 #define itkQuadEdgeMeshDecimationQuadricElementHelper_h
22 #include "vnl/vnl_vector_fixed.h"
23 #include "vnl/vnl_matrix.h"
24 #include "vnl/algo/vnl_matrix_inverse.h"
31 template<
typename TPo
int >
103 CoordType oError = inner_product( iP.GetVnlVector(), svd.recompose() * iP.GetVnlVector() );
157 oP[dim] = iP[dim] + displacement[dim];
165 const unsigned int & )
171 const CoordType & iWeight = static_cast< CoordType >( 1. ) )
180 const CoordType & iWeight = static_cast< CoordType >( 1. ) )
182 unsigned int k(0), dim1, dim2;
184 CoordType d = -iN *iP.GetVectorFromOrigin();
256 unsigned int k(0), dim1, dim2;
vnl_vector_fixed< CoordType, Self::NumberOfCoefficients > CoefficientVectorType
Self & operator-=(const Self &iRight)
Self & operator=(const Self &iRight)
~QuadEdgeMeshDecimationQuadricElementHelper()=default
TODO explicit specification for VDimension=3!!!
static constexpr unsigned int NumberOfCoefficients
static constexpr unsigned int PointDimension
VNLMatrixType GetAMatrix()
QuadEdgeMeshDecimationQuadricElementHelper()
Self operator-(const Self &iRight) const
Define numeric traits for std::vector.
QuadEdgeMeshDecimationQuadricElementHelper(const CoefficientVectorType &iCoefficients)
VNLVectorType GetBVector()
static VectorType ComputeNormal(const PointType &iA, const PointType &iB, const PointType &iC)
Compute Normal vector to the triangle formed by (iA,iB,iC)
CoordType m_SVDRelativeThreshold
QuadEdgeMeshDecimationQuadricElementHelper Self
Self & operator*=(const CoordType &iV)
typename PointType::CoordRepType CoordType
void AddPoint(const PointType &iP, const VectorType &iN, const CoordType &iWeight=static_cast< CoordType >(1.))
vnl_matrix< CoordType > VNLMatrixType
A convenience class for computation of various triangle elements in 2D or 3D.
PointType ComputeOptimalLocation(const PointType &iP)
CoordType ComputeError(const PointType &iP) const
TODO this method should be really optimized!!!
Self operator*(const CoordType &iV) const
CoordType ComputeErrorAtOptimalLocation(const PointType &iP)
TODO this method should be really optimized!!!
unsigned int GetRank() const
CoefficientVectorType m_Coefficients
typename PointType::VectorType VectorType
vnl_vector_fixed< CoordType, Self::PointDimension > VNLVectorType
CoordType m_SVDAbsoluteThreshold
Self operator+(const Self &iRight) const
static constexpr double e
The base of the natural logarithm or Euler's number
PointType ComputeOptimalLocation(const unsigned int &)
TODO to be implemented!!!
Self & operator+=(const Self &iRight)
void ComputeAMatrixAndBVector()
void AddTriangle(const PointType &iP1, const PointType &iP2, const PointType &iP3, const CoordType &iWeight=static_cast< CoordType >(1.))
ImageBaseType::SpacingType VectorType
CoefficientVectorType GetCoefficients() const