18 #ifndef itkQuadricDecimationQuadEdgeMeshFilter_h
19 #define itkQuadricDecimationQuadEdgeMeshFilter_h
31 template<
typename TInput,
typename TOutput,
typename TCriterion >
42 TInput, TOutput, TCriterion >;
64 static constexpr
unsigned int OutputPointDimension = OutputMeshType::PointDimension;
83 std::map< OutputPointIdentifier, QuadricElementType >;
103 id[0] = iEdge->GetOrigin();
104 id[1] = iEdge->GetDestination();
105 id[2] = iEdge->GetOnext()->GetDestination();
109 for (
int i = 0; i < 3; i++ )
111 p[i] = outputMesh->GetPoint(
id[i]);
132 mid.SetToMidPoint(org, dest);
142 void DeletePoint(
const OutputPointIdentifier & iIdToBeDeleted,
143 const OutputPointIdentifier & iRemaining)
override;
149 OutputPointType Relocate(OutputQEType *iEdge)
override;
152 void Initialize()
override;
158 #ifndef ITK_MANUAL_INSTANTIATION
159 #include "itkQuadricDecimationQuadEdgeMeshFilter.hxx"
typename OutputMeshType::CellsContainerIterator OutputCellsContainerIterator
TODO explicit specification for VDimension=3!!!
Light weight base class for most itk classes.
typename QueueMapType::iterator QueueMapIterator
void QuadricAtOrigin(OutputQEType *iEdge, QuadricElementType &oQ, OutputMeshType *outputMesh)
Compute the quadric error at the origin of the edge.
std::map< OutputQEType *, PriorityQueueItemType * > QueueMapType
Collapse a given edge by joining its dest and its org.
QuadricElementMapType m_Quadric
typename PriorityQueueType::Pointer PriorityQueuePointer
typename QuadricElementMapType::iterator QuadricElementMapIterator
typename CriterionType::PriorityQueueWrapperType PriorityQueueItemType
typename CriterionType::MeasureType MeasureType
typename OutputPointType::CoordRepType OutputCoordType
typename OutputMeshType::PointsContainerIterator OutputPointsContainerIterator
typename CriterionType::PriorityType PriorityType
std::map< OutputPointIdentifier, QuadricElementType > QuadricElementMapType
PointType ComputeOptimalLocation(const PointType &iP)
CoordType ComputeError(const PointType &iP) const
TODO this method should be really optimized!!!
typename OutputMeshType::Pointer OutputMeshPointer
typename OutputMeshType::PointIdentifier OutputPointIdentifier
typename OperatorType::Pointer OperatorPointer
typename OutputMeshType::QEType OutputQEType
typename OutputMeshType::PointsContainerPointer OutputPointsContainerPointer
MeasureType MeasureEdge(OutputQEType *iEdge) override
Compute the measure value for iEdge.
ImageBaseType::PointType PointType
void AddTriangle(const PointType &iP1, const PointType &iP2, const PointType &iP3, const CoordType &iWeight=static_cast< CoordType >(1.))
typename InputMeshType::Pointer InputMeshPointer
typename OutputMeshType::PointType OutputPointType
typename OutputMeshType::EdgeCellType OutputEdgeCellType