18 #ifndef itkEdgeDecimationQuadEdgeMeshFilter_h
19 #define itkEdgeDecimationQuadEdgeMeshFilter_h
39 template<
typename TInput,
typename TOutput,
typename TCriterion >
81 typedef std::map< OutputQEType *, PriorityQueueItemType * >
QueueMapType;
94 bool m_CheckOrientation;
112 void FillPriorityQueue() ITK_OVERRIDE;
130 void Extract() ITK_OVERRIDE;
151 virtual
void JoinVertexFailed();
156 virtual
bool ProcessWithoutAnyTopologicalGuarantee() ITK_OVERRIDE;
162 virtual
unsigned int CheckQEProcessingStatus();
168 virtual
bool ProcessWithTopologicalGuarantee() ITK_OVERRIDE;
210 std::list< OutputCellIdentifier > r1, r2, elements_to_be_tested;
216 r1.push_back( qe_it->GetLeft() );
217 qe_it = qe_it->GetOnext();
219 while ( qe_it != qe );
221 qe = iEdge->GetSym();
222 qe_it = qe->GetOnext();
226 r2.push_back( qe_it->GetLeft() );
227 qe_it = qe_it->GetOnext();
229 while ( qe_it != qe );
234 std::set_symmetric_difference( r1.begin(), r1.end(),
235 r2.begin(), r2.end(),
236 std::back_inserter(elements_to_be_tested) );
238 typename std::list< OutputCellIdentifier >::iterator
239 it = elements_to_be_tested.begin();
243 bool orientation_ok(
true);
248 int k(0), replace_k(0);
253 while ( ( it != elements_to_be_tested.end() ) && orientation_ok )
264 p_id = qe_it->GetOrigin();
269 pt[k++] = output->GetPoint(p_id);
270 qe_it = qe_it->GetLnext();
272 while ( qe_it != qe );
274 n_bef = TriangleType::ComputeNormal(pt[0], pt[1], pt[2]);
279 n_aft = TriangleType::ComputeNormal(iPt, pt[1], pt[2]);
282 n_aft = TriangleType::ComputeNormal(pt[0], iPt, pt[2]);
285 n_aft = TriangleType::ComputeNormal(pt[0], pt[1], iPt);
289 orientation_ok = ( n_bef * n_aft ) < 0.;
293 return orientation_ok;
300 bool IsCriterionSatisfied() ITK_OVERRIDE;
304 void operator=(const Self &);
309 #include "itkEdgeDecimationQuadEdgeMeshFilter.hxx"
OperatorType::Pointer OperatorPointer
DecimationQuadEdgeMeshFilter< TInput, TOutput, TCriterion > Superclass
CriterionType::PriorityType PriorityType
QuadEdgeMeshEulerOperatorJoinVertexFunction< OutputMeshType, OutputQEType > OperatorType
QueueMapType::const_iterator QueueMapConstIterator
CriterionType::MeasureType MeasureType
OutputMeshType::Pointer OutputMeshPointer
QuadEdgeMeshPolygonCell< OutputCellType > OutputPolygonType
Collapse a given edge by joining its dest and its org.
OutputMeshType::QEType OutputQEType
OutputMeshType::PointIdentifier OutputPointIdentifier
OutputMeshType::EdgeCellType OutputEdgeCellType
QuadEdgeType * GetEdgeRingEntry() const
OutputMeshType::CellsContainerPointer OutputCellsContainerPointer
OutputMeshType::CellsContainerIterator OutputCellsContainerIterator
unsigned long SizeValueType
ImageBaseType::SpacingType VectorType
PriorityQueueType::Pointer PriorityQueuePointer
OutputMeshType::CellIdentifier OutputCellIdentifier
OutputMeshType::CellType OutputCellType
A convenience class for computation of various triangle elements in 2D or 3D.
OutputMeshType::PointType OutputPointType
std::map< OutputQEType *, PriorityQueueItemType * > QueueMapType
ImageBaseType::PointType PointType
QueueMapType::iterator QueueMapIterator
SmartPointer< const Self > ConstPointer
CriterionType::PriorityQueueWrapperType PriorityQueueItemType
CriterionType::MeasureType MeasureType
OutputPointType::VectorType OutputVectorType
PriorityQueueContainer< PriorityQueueItemType *, ElementWrapperPointerInterface< PriorityQueueItemType * >, PriorityType > PriorityQueueType
InputMeshType::Pointer InputMeshPointer
SmartPointer< Self > Pointer
CriterionType::Pointer CriterionPointer
OutputMeshType::Pointer OutputMeshPointer
EdgeDecimationQuadEdgeMeshFilter Self
CriterionType::PriorityType PriorityType