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 >
40 itkStaticConstMacro(
PointDimension,
unsigned int, PointType::PointDimension);
105 CoordType oError = inner_product( iP.GetVnlVector(), svd.recompose() * iP.GetVnlVector() );
159 oP[dim] = iP[dim] + displacement[dim];
167 const unsigned int & )
173 const CoordType & iWeight = static_cast< CoordType >( 1. ) )
182 const CoordType & iWeight = static_cast< CoordType >( 1. ) )
184 unsigned int k(0), dim1, dim2;
186 CoordType d = -iN *iP.GetVectorFromOrigin();
258 unsigned int k(0), dim1, dim2;
Self & operator-=(const Self &iRight)
Self & operator=(const Self &iRight)
TODO explicit specification for VDimension=3!!!
static const unsigned int PointDimension
VNLMatrixType GetAMatrix()
QuadEdgeMeshDecimationQuadricElementHelper()
Self operator-(const Self &iRight) const
static const unsigned int NumberOfCoefficients
PointType::CoordRepType CoordType
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
static const double e
The base of the natural logarithm or Euler's number
Self & operator*=(const CoordType &iV)
void AddPoint(const PointType &iP, const VectorType &iN, const CoordType &iWeight=static_cast< CoordType >(1.))
~QuadEdgeMeshDecimationQuadricElementHelper()
TriangleHelper< PointType > TriangleType
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
CoordType m_SVDAbsoluteThreshold
vnl_vector_fixed< CoordType, itkGetStaticConstMacro(PointDimension) > VNLVectorType
Self operator+(const Self &iRight) const
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.))
vnl_matrix< CoordType > VNLMatrixType
Define additional traits for native types such as int or float.
CoefficientVectorType GetCoefficients() const
vnl_vector_fixed< CoordType, itkGetStaticConstMacro(NumberOfCoefficients) > CoefficientVectorType
PointType::VectorType VectorType