18 #ifndef __itkEdgeDecimationQuadEdgeMeshFilter_h
19 #define __itkEdgeDecimationQuadEdgeMeshFilter_h
39 template<
class TInput,
class TOutput,
class TCriterion >
81 typedef std::map< OutputQEType *, PriorityQueueItemType * >
QueueMapType;
112 void FillPriorityQueue();
151 virtual void JoinVertexFailed();
156 virtual bool ProcessWithoutAnyTopologicalGuarantee();
162 virtual unsigned int CheckQEProcessingStatus();
168 virtual bool ProcessWithTopologicalGuarantee();
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();
304 void operator=(
const Self &);
309 #include "itkEdgeDecimationQuadEdgeMeshFilter.hxx"