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"
31template <
typename TPo
int>
44 using VNLVectorType = vnl_vector_fixed<CoordType, Self::PointDimension>;
105 CoordType oError = inner_product(iP.GetVnlVector(), svd.recompose() * iP.GetVnlVector());
154 const auto y = (
m_B.as_vector() -
m_A * iP.GetVnlVector());
161 oP[dim] = iP[dim] + displacement[dim];
185 unsigned int k(0), dim1, dim2;
187 CoordType d = -iN * iP.GetVectorFromOrigin();
265 unsigned int k(0), dim1, dim2;
Pixel-wise addition of two images.
TODO explicit specification for VDimension=3!!!
vnl_vector_fixed< CoordType, Self::PointDimension > VNLVectorType
vnl_matrix< CoordType > VNLMatrixType
~QuadEdgeMeshDecimationQuadricElementHelper()=default
CoefficientVectorType m_Coefficients
PointType ComputeOptimalLocation(const unsigned int)
TODO to be implemented!!!
CoordType ComputeErrorAtOptimalLocation(const PointType &iP)
TODO this method should be really optimized!!!
unsigned int GetRank() const
CoordType m_SVDAbsoluteThreshold
Self & operator*=(const CoordType &iV)
CoordType ComputeError(const PointType &iP) const
TODO this method should be really optimized!!!
QuadEdgeMeshDecimationQuadricElementHelper Self
Self operator-(const Self &iRight) const
typename PointType::CoordRepType CoordType
PointType ComputeOptimalLocation(const PointType &iP)
vnl_vector_fixed< CoordType, Self::NumberOfCoefficients > CoefficientVectorType
static constexpr unsigned int PointDimension
VNLMatrixType GetAMatrix()
Self operator*(const CoordType &iV) const
Self operator+(const Self &iRight) const
Self & operator=(const Self &iRight)
Self & operator+=(const Self &iRight)
typename PointType::VectorType VectorType
QuadEdgeMeshDecimationQuadricElementHelper(const CoefficientVectorType &iCoefficients)
CoordType m_SVDRelativeThreshold
void ComputeAMatrixAndBVector()
static constexpr unsigned int NumberOfCoefficients
void AddPoint(const PointType &iP, const VectorType &iN, const CoordType &iWeight=static_cast< CoordType >(1.))
CoefficientVectorType GetCoefficients() const
Self & operator-=(const Self &iRight)
void AddTriangle(const PointType &iP1, const PointType &iP2, const PointType &iP3, const CoordType &iWeight=static_cast< CoordType >(1.))
QuadEdgeMeshDecimationQuadricElementHelper()
VNLVectorType GetBVector()
A convenience class for computation of various triangle elements in 2D or 3D.
static VectorType ComputeNormal(const PointType &iA, const PointType &iB, const PointType &iC)
Compute Normal vector to the triangle formed by (iA,iB,iC)
ImageBaseType::SpacingType VectorType
static constexpr double e
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....