ITK  5.0.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:
40  ITK_DISALLOW_COPY_AND_ASSIGN(CleanQuadEdgeMeshFilter);
41 
45  using Superclass =
47 
50 
52  itkNewMacro(Self);
53 
54  using InputMeshType = TInputMesh;
55  using InputMeshPointer = typename Superclass::InputMeshPointer;
57  using InputPointType = typename Superclass::InputPointType;
58  using InputPointIdentifier = typename Superclass::InputPointIdentifier;
59  using InputQEPrimal = typename Superclass::InputQEPrimal;
60  using InputVectorType = typename Superclass::InputVectorType;
61 
62  using InputEdgeCellType = typename Superclass::InputEdgeCellType;
63  using InputPolygonCellType = typename Superclass::InputPolygonCellType;
64  using InputPointIdList = typename Superclass::InputPointIdList;
65  using InputCellTraits = typename Superclass::InputCellTraits;
66  using InputPointsIdInternalIterator = typename Superclass::InputPointsIdInternalIterator;
67  using InputQEIterator = typename Superclass::InputQEIterator;
68 
69  using InputPointsContainer = typename InputMeshType::PointsContainer;
70  using InputPointsContainerPointer = typename InputMeshType::PointsContainerPointer;
71  using InputPointsContainerIterator = typename InputMeshType::PointsContainerIterator;
72 
73  using InputCellsContainerIterator = typename InputMeshType::CellsContainerIterator;
74 
75  static constexpr unsigned int PointDimension = InputMeshType::PointDimension;
76 
77  using OutputMeshType = TOutputMesh;
78  using OutputMeshPointer = typename Superclass::OutputMeshPointer;
79  using OutputCoordRepType = typename Superclass::OutputCoordRepType;
80  using OutputPointType = typename Superclass::OutputPointType;
81  using OutputPointIdentifier = typename Superclass::OutputPointIdentifier;
82  using OutputQEPrimal = typename Superclass::OutputQEPrimal;
83  using OutputVectorType = typename Superclass::OutputVectorType;
84 
85  using OutputQEType = typename OutputMeshType::QEType;
86  using OutputPointsContainer = typename OutputMeshType::PointsContainer;
87  using OutputPointsContainerPointer = typename OutputMeshType::PointsContainerPointer;
88  using OutputPointsContainerIterator = typename OutputMeshType::PointsContainerIterator;
89 
90  using OutputCellsContainerIterator = typename OutputMeshType::CellsContainerIterator;
91 
92  using BoundingBoxType = BoundingBox< InputPointIdentifier, Self::PointDimension,
94 
96 
99 
104 
106  itkSetMacro(AbsoluteTolerance, InputCoordRepType);
107  itkGetConstMacro(AbsoluteTolerance, InputCoordRepType);
109 
111  itkSetClampMacro(RelativeTolerance, InputCoordRepType, 0.0, 1.0);
112  itkGetConstMacro(RelativeTolerance, InputCoordRepType);
114 
115 protected:
117 
118  ~CleanQuadEdgeMeshFilter() override = default;
119 
120  void GenerateData() override;
121 
122  virtual void MergePoints( const InputCoordRepType absoluteToleranceSquared );
123 
124  virtual void CleanPoints();
125 
126  void PrintSelf(std::ostream & os, Indent indent) const override;
127 
128 private:
131 
135 
136 };
137 } // end namespace itk
138 
139 #ifndef ITK_MANUAL_INSTANTIATION
140 #include "itkCleanQuadEdgeMeshFilter.hxx"
141 #endif
142 
143 #endif
typename InputMeshType::CoordRepType InputCoordRepType
typename OutputMeshType::PointsContainerIterator OutputPointsContainerIterator
Light weight base class for most itk classes.
TOutputMesh OutputMeshType
Definition: itkMeshSource.h:68
typename InputQEPrimal::IteratorGeom InputQEIterator
typename InputMeshType::PointsContainerIterator InputPointsContainerIterator
typename CriterionType::Pointer CriterionPointer
typename InputMeshType::PointIdentifier InputPointIdentifier
typename InputMeshType::PolygonCellType InputPolygonCellType
typename InputMeshType::PointsContainerPointer InputPointsContainerPointer
typename OutputMeshType::PointIdentifier OutputPointIdentifier
typename OutputMeshType::CoordRepType OutputCoordRepType
typename InputMeshType::Pointer InputMeshPointer
typename OutputMeshType::CellsContainerIterator OutputCellsContainerIterator
typename DecimationType::Pointer DecimationPointer
typename InputCellTraits::PointIdInternalIterator InputPointsIdInternalIterator
typename OutputMeshType::Pointer OutputMeshPointer
Definition: itkMeshSource.h:69
typename InputMeshType::CellsContainerIterator InputCellsContainerIterator
typename InputMeshType::EdgeCellType InputEdgeCellType
typename OutputMeshType::PointsContainer OutputPointsContainer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename OutputMeshType::VectorType OutputVectorType
typename BoundingBoxType::Pointer BoundingBoxPointer
typename InputMeshType::PointsContainer InputPointsContainer
typename OutputMeshType::PointsContainerPointer OutputPointsContainerPointer
Represent and compute information about bounding boxes.
typename InputMeshType::PointIdList InputPointIdList
typename OutputMeshType::QEType OutputQEType