ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkCleanQuadEdgeMeshFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkCleanQuadEdgeMeshFilter_h
19 #define __itkCleanQuadEdgeMeshFilter_h
20 
21 #include "itkIntTypes.h"
23 #include "itkBoundingBox.h"
24 
27 
28 namespace itk
29 {
35 template< class TInputMesh, class TOutputMesh=TInputMesh >
36 class ITK_EXPORT CleanQuadEdgeMeshFilter:
37  public QuadEdgeMeshToQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
38 {
39 public:
45 
48 
50  itkNewMacro(Self);
51 
52  typedef TInputMesh InputMeshType;
53  typedef typename Superclass::InputMeshPointer InputMeshPointer;
55  typedef typename Superclass::InputPointType InputPointType;
56  typedef typename Superclass::InputPointIdentifier InputPointIdentifier;
57  typedef typename Superclass::InputQEPrimal InputQEPrimal;
58  typedef typename Superclass::InputVectorType InputVectorType;
59 
60  typedef typename Superclass::InputEdgeCellType InputEdgeCellType;
61  typedef typename Superclass::InputPolygonCellType InputPolygonCellType;
62  typedef typename Superclass::InputPointIdList InputPointIdList;
63  typedef typename Superclass::InputCellTraits InputCellTraits;
64  typedef typename Superclass::InputPointsIdInternalIterator InputPointsIdInternalIterator;
65  typedef typename Superclass::InputQEIterator InputQEIterator;
66 
67  typedef typename InputMeshType::PointsContainer InputPointsContainer;
68  typedef typename InputMeshType::PointsContainerPointer InputPointsContainerPointer;
69  typedef typename InputMeshType::PointsContainerIterator InputPointsContainerIterator;
70 
71  typedef typename InputMeshType::CellsContainerIterator InputCellsContainerIterator;
72 
73  itkStaticConstMacro(PointDimension, unsigned int, InputMeshType::PointDimension);
74 
75  typedef TOutputMesh OutputMeshType;
76  typedef typename Superclass::OutputMeshPointer OutputMeshPointer;
77  typedef typename Superclass::OutputCoordRepType OutputCoordRepType;
78  typedef typename Superclass::OutputPointType OutputPointType;
79  typedef typename Superclass::OutputPointIdentifier OutputPointIdentifier;
80  typedef typename Superclass::OutputQEPrimal OutputQEPrimal;
81  typedef typename Superclass::OutputVectorType OutputVectorType;
82 
83  typedef typename OutputMeshType::QEType OutputQEType;
84  typedef typename OutputMeshType::PointsContainer OutputPointsContainer;
85  typedef typename OutputMeshType::PointsContainerPointer OutputPointsContainerPointer;
86  typedef typename OutputMeshType::PointsContainerIterator OutputPointsContainerIterator;
87 
88  typedef typename OutputMeshType::CellsContainerIterator OutputCellsContainerIterator;
89 
90  typedef BoundingBox< InputPointIdentifier, itkGetStaticConstMacro(PointDimension),
92 
94 
97 
102 
104  itkSetMacro(AbsoluteTolerance, InputCoordRepType);
105  itkGetConstMacro(AbsoluteTolerance, InputCoordRepType);
107 
109  itkSetClampMacro(RelativeTolerance, InputCoordRepType, 0.0, 1.0);
110  itkGetConstMacro(RelativeTolerance, InputCoordRepType);
112 
113 protected:
115 
117 
118  virtual void GenerateData();
119 
120  virtual void MergePoints( const InputCoordRepType absoluteToleranceSquared );
121 
122  virtual void CleanPoints();
123 
124  void PrintSelf(std::ostream & os, Indent indent) const;
125 
126 private:
127  CleanQuadEdgeMeshFilter(const Self &); // purposely not implemented
128  void operator=(const Self &); // purposely not implemented
129 
132 
136 
137 };
138 } // end namespace itk
139 
140 #ifndef ITK_MANUAL_INSTANTIATION
141 #include "itkCleanQuadEdgeMeshFilter.hxx"
142 #endif
143 
144 #endif
145