18#ifndef itkQuadricDecimationQuadEdgeMeshFilter_h
19#define itkQuadricDecimationQuadEdgeMeshFilter_h
31template <
typename TInput,
typename TOutput,
typename TCriterion>
63 static constexpr unsigned int OutputPointDimension = OutputMeshType::PointDimension;
68 using typename Superclass::PriorityType;
69 using typename Superclass::PriorityQueueItemType;
70 using typename Superclass::PriorityQueueType;
71 using typename Superclass::PriorityQueuePointer;
73 using typename Superclass::QueueMapType;
74 using typename Superclass::QueueMapIterator;
76 using typename Superclass::OperatorType;
77 using typename Superclass::OperatorPointer;
102 id[0] = iEdge->GetOrigin();
103 id[1] = iEdge->GetDestination();
104 id[2] = iEdge->GetOnext()->GetDestination();
108 for (
int i = 0; i < 3; ++i)
110 p[i] = outputMesh->GetPoint(
id[i]);
132 mid.SetToMidPoint(org, dest);
160#ifndef ITK_MANUAL_INSTANTIATION
161# include "itkQuadricDecimationQuadEdgeMeshFilter.hxx"
typename InputMeshType::Pointer InputMeshPointer
typename CriterionType::MeasureType MeasureType
typename OutputMeshType::Pointer OutputMeshPointer
typename OutputMeshType::PointIdentifier OutputPointIdentifier
typename OutputMeshType::QEType OutputQEType
typename OutputMeshType::PointType OutputPointType
typename OutputMeshType::EdgeCellType OutputEdgeCellType
typename OutputMeshType::CellsContainerIterator OutputCellsContainerIterator
Light weight base class for most itk classes.
TODO explicit specification for VDimension=3!!!
CoordType ComputeError(const PointType &iP) const
TODO this method should be really optimized!!!
PointType ComputeOptimalLocation(const PointType &iP)
void AddTriangle(const PointType &iP1, const PointType &iP2, const PointType &iP3, const CoordType &iWeight=static_cast< CoordType >(1.))
void QuadricAtOrigin(OutputQEType *iEdge, QuadricElementType &oQ, OutputMeshType *outputMesh)
Compute the quadric error at the origin of the edge.
QuadricDecimationQuadEdgeMeshFilter()=default
Constructor.
typename OutputMeshType::PointsContainerIterator OutputPointsContainerIterator
void Initialize() override
Compute Quadric error for all edges.
~QuadricDecimationQuadEdgeMeshFilter() override=default
Destructor.
void DeletePoint(const OutputPointIdentifier &iIdToBeDeleted, const OutputPointIdentifier &iRemaining) override
Delete point.
typename OutputMeshType::PointsContainerPointer OutputPointsContainerPointer
std::map< OutputPointIdentifier, QuadricElementType > QuadricElementMapType
typename QuadricElementMapType::iterator QuadricElementMapIterator
typename OutputPointType::CoordRepType OutputCoordType
OutputPointType Relocate(OutputQEType *iEdge) override
Compute the optimal position for a given edge iEdge.
MeasureType MeasureEdge(OutputQEType *iEdge) override
Compute the measure value for iEdge.
SmartPointer< Self > Pointer
ImageBaseType::PointType PointType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....