ITK  4.13.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< typename TInputMesh, typename TOutputMesh=TInputMesh >
36 class ITK_TEMPLATE_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 
116  virtual ~CleanQuadEdgeMeshFilter() ITK_OVERRIDE {}
117 
118  virtual void GenerateData() ITK_OVERRIDE;
119 
120  virtual void MergePoints( const InputCoordRepType absoluteToleranceSquared );
121 
122  virtual void CleanPoints();
123 
124  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
125 
126 private:
127  ITK_DISALLOW_COPY_AND_ASSIGN(CleanQuadEdgeMeshFilter);
128 
129  InputCoordRepType m_AbsoluteTolerance;
130  InputCoordRepType m_RelativeTolerance;
131 
132  BoundingBoxPointer m_BoundingBox;
133  CriterionPointer m_Criterion;
134  DecimationPointer m_Decimation;
135 
136 };
137 } // end namespace itk
138 
139 #ifndef ITK_MANUAL_INSTANTIATION
140 #include "itkCleanQuadEdgeMeshFilter.hxx"
141 #endif
142 
143 #endif
InputMeshType::PointsContainerIterator InputPointsContainerIterator
Light weight base class for most itk classes.
OutputMeshType::CellsContainerIterator OutputCellsContainerIterator
Superclass::InputPointIdentifier InputPointIdentifier
OutputMeshType::PointsContainer OutputPointsContainer
Superclass::InputQEIterator InputQEIterator
Superclass::InputPointIdList InputPointIdList
Superclass::OutputVectorType OutputVectorType
MaxMeasureBoundCriterion< OutputMeshType > CriterionType
Superclass::InputCoordRepType InputCoordRepType
InputMeshType::PointsContainer InputPointsContainer
Superclass::OutputMeshPointer OutputMeshPointer
InputMeshType::PointsContainerPointer InputPointsContainerPointer
Superclass::InputPolygonCellType InputPolygonCellType
Superclass::InputPointType InputPointType
DecimationType::Pointer DecimationPointer
Superclass::InputVectorType InputVectorType
Superclass::InputEdgeCellType InputEdgeCellType
OutputMeshType::PointsContainerIterator OutputPointsContainerIterator
BoundingBox< InputPointIdentifier, itkGetStaticConstMacro(PointDimension), InputCoordRepType, InputPointsContainer > BoundingBoxType
Superclass::InputMeshPointer InputMeshPointer
Superclass::InputCellTraits InputCellTraits
Superclass::OutputPointType OutputPointType
SquaredEdgeLengthDecimationQuadEdgeMeshFilter< InputMeshType, InputMeshType, CriterionType > DecimationType
Superclass::OutputQEPrimal OutputQEPrimal
OutputMeshType::PointsContainerPointer OutputPointsContainerPointer
Superclass::InputPointsIdInternalIterator InputPointsIdInternalIterator
Superclass::OutputCoordRepType OutputCoordRepType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
BoundingBoxType::Pointer BoundingBoxPointer
InputMeshType::CellsContainerIterator InputCellsContainerIterator
Superclass::InputQEPrimal InputQEPrimal
QuadEdgeMeshToQuadEdgeMeshFilter< TInputMesh, TOutputMesh > Superclass
SmartPointer< const Self > ConstPointer
Represent and compute information about bounding boxes.
Superclass::OutputPointIdentifier OutputPointIdentifier