]> Creatis software - cpMesh.git/blob - lib/cpm/Algorithms/QuadEdge/DecimationFilter.h
First commit
[cpMesh.git] / lib / cpm / Algorithms / QuadEdge / DecimationFilter.h
1 #ifndef __CPM__ALGORITHMS__QUADEDGE__DECIMATIONFILTER__H__
2 #define __CPM__ALGORITHMS__QUADEDGE__DECIMATIONFILTER__H__
3
4 #include <itkMeshToMeshFilter.h>
5
6 namespace cpm
7 {
8   namespace Algorithms
9   {
10     namespace QuadEdge
11     {
12       /**
13        */
14       template< class I, class O, class C >
15       class DecimationFilter
16         : public itk::MeshToMeshFilter< I, O >
17       {
18       public:
19         typedef DecimationFilter                Self;
20         typedef itk::MeshToMeshFilter< I, O >   Superclass;
21         typedef itk::SmartPointer< Self >       Pointer;
22         typedef itk::SmartPointer< const Self > ConstPointer;
23
24         typedef I TInputMesh;
25         typedef O TOutputMesh;
26         typedef C TCriterion;
27
28       public:
29         itkTypeMacro( DecimationFilter, itkMeshToMeshFilter );
30         itkSetObjectMacro( Criterion, C );
31
32       protected:
33         DecimationFilter( );
34         virtual ~DecimationFilter( );
35
36         virtual void GenerateData( );
37         virtual void Initialize( );
38
39         virtual void FillPriorityQueue( ) = 0;
40         virtual void Extract( ) = 0;
41         virtual bool ProcessWithoutAnyTopologicalGuarantee( ) = 0;
42         virtual bool ProcessWithTopologicalGuarantee( ) = 0;
43         virtual bool IsCriterionSatisfied( ) = 0;
44
45       private:
46         // Purposely not implemented
47         DecimationFilter( const Self& );
48         void operator=( const Self& );
49
50       protected:
51         typename C::Pointer m_Criterion;
52         unsigned long       m_Iteration;
53       };
54
55     } // ecapseman
56
57   } // ecapseman
58
59 } // ecapseman
60
61 #include <cpm/Algorithms/QuadEdge/DecimationFilter.hxx>
62
63 #endif // __CPM__ALGORITHMS__QUADEDGE__DECIMATIONFILTER__H__
64
65 // eof - $RCSfile$