18#ifndef itkEdgeDecimationQuadEdgeMeshFilter_h 
   19#define itkEdgeDecimationQuadEdgeMeshFilter_h 
   39template <
typename TInput, 
typename TOutput, 
typename TCriterion>
 
   82  using QueueMapType = std::map<OutputQEType *, PriorityQueueItemType *>;
 
  228    std::list<OutputCellIdentifier> r1;
 
  231      r1.push_back(qe_it->GetLeft());
 
  232      qe_it = qe_it->GetOnext();
 
  233    } 
while (qe_it != qe);
 
  235    qe = iEdge->GetSym();
 
  236    qe_it = qe->GetOnext();
 
  238    std::list<OutputCellIdentifier> r2;
 
  241      r2.push_back(qe_it->GetLeft());
 
  242      qe_it = qe_it->GetOnext();
 
  243    } 
while (qe_it != qe);
 
  248    std::list<OutputCellIdentifier> elements_to_be_tested;
 
  249    std::set_symmetric_difference(
 
  250      r1.begin(), r1.end(), r2.begin(), r2.end(), std::back_inserter(elements_to_be_tested));
 
  252    typename std::list<OutputCellIdentifier>::iterator it = elements_to_be_tested.begin();
 
  256    bool            orientation_ok(
true);
 
  260    while ((it != elements_to_be_tested.end()) && orientation_ok)
 
  265      qe = poly->GetEdgeRingEntry();
 
  276        pt[k++] = output->GetPoint(p_id);
 
  277        qe_it = qe_it->GetLnext();
 
  278      } 
while (qe_it != qe);
 
  286          n_aft = TriangleType::ComputeNormal(iPt, pt[1], pt[2]);
 
  289          n_aft = TriangleType::ComputeNormal(pt[0], iPt, pt[2]);
 
  292          n_aft = TriangleType::ComputeNormal(pt[0], pt[1], iPt);
 
  296      orientation_ok = (n_bef * n_aft) < 0.;
 
  300    return orientation_ok;
 
 
  312#include "itkEdgeDecimationQuadEdgeMeshFilter.hxx" 
DecimationQuadEdgeMeshFilter()
typename PriorityQueueType::Pointer PriorityQueuePointer
typename OutputPointType::VectorType OutputVectorType
bool ProcessWithTopologicalGuarantee() override
QuadEdgeMeshPolygonCell< OutputCellType > OutputPolygonType
virtual unsigned int CheckQEProcessingStatus()
void TagElementOut(OutputQEType *iEdge)
void DeleteElement(OutputQEType *iEdge)
Delete a given edge in the priority queue.
DecimationQuadEdgeMeshFilter< TInput, TOutput, TCriterion > Superclass
SmartPointer< Self > Pointer
typename OutputMeshType::Pointer OutputMeshPointer
typename OperatorType::Pointer OperatorPointer
EdgeDecimationQuadEdgeMeshFilter Self
bool CheckOrientation(OutputQEType *iEdge, const OutputPointIdentifier &iId, const OutputPointType &iPt)
typename QueueMapType::const_iterator QueueMapConstIterator
SmartPointer< const Self > ConstPointer
typename OutputMeshType::PointIdentifier OutputPointIdentifier
void FillPriorityQueue() override
Fill the priority queue.
~EdgeDecimationQuadEdgeMeshFilter() override
bool IsCriterionSatisfied() override
typename OutputMeshType::QEType OutputQEType
typename OutputMeshType::CellType OutputCellType
virtual void PushOrUpdateElement(OutputQEType *iEdge)
Push iEdge in the priority queue if it is not already, else its corresponding priority value is updat...
PriorityQueueContainer< PriorityQueueItemType *, ElementWrapperPointerInterface< PriorityQueueItemType * >, PriorityType > PriorityQueueType
void Extract() override
Extract the edge to be processed.
typename OutputMeshType::PointType OutputPointType
typename OutputMeshType::EdgeCellType OutputEdgeCellType
void PushElement(OutputQEType *iEdge)
Push one edge in the priority queue.
typename OutputMeshType::CellsContainerPointer OutputCellsContainerPointer
typename InputMeshType::Pointer InputMeshPointer
std::map< OutputQEType *, PriorityQueueItemType * > QueueMapType
QuadEdgeMeshEulerOperatorJoinVertexFunction< OutputMeshType, OutputQEType > OperatorType
typename OutputMeshType::CellsContainerIterator OutputCellsContainerIterator
bool ProcessWithoutAnyTopologicalGuarantee() override
QueueMapType m_QueueMapper
typename QueueMapType::iterator QueueMapIterator
typename CriterionType::PriorityType PriorityType
typename CriterionType::PriorityQueueWrapperType PriorityQueueItemType
virtual void DeletePoint(const OutputPointIdentifier &iIdToBeDeleted, const OutputPointIdentifier &iRemaining)
bool IsEdgeOKToBeProcessed(OutputQEType *iEdge)
Check if iEdge is valid and then can be processed.
virtual OutputPointType Relocate(OutputQEType *iEdge)=0
virtual MeasureType MeasureEdge(OutputQEType *iEdge)=0
Compute the measure value for iEdge.
typename CriterionType::MeasureType MeasureType
virtual void JoinVertexFailed()
OperatorPointer m_JoinVertexFunction
typename OutputMeshType::CellIdentifier OutputCellIdentifier
typename CriterionType::Pointer CriterionPointer
SizeValueType NumberOfCommonVerticesIn0Ring() const
PriorityQueuePointer m_PriorityQueue
EdgeDecimationQuadEdgeMeshFilter()
OutputMeshType * GetOutput()
SmartPointer< Self > Pointer
Collapse a given edge by joining its dest and its org.
SmartPointer< Self > Pointer
Implements transparent reference counting.
A convenience class for computation of various triangle elements in 2D or 3D.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType