ITK  6.0.0
Insight Toolkit
itkCleanQuadEdgeMeshFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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
28namespace itk
29{
35template <typename TInputMesh, typename TOutputMesh = TInputMesh>
36class ITK_TEMPLATE_EXPORT CleanQuadEdgeMeshFilter : public QuadEdgeMeshToQuadEdgeMeshFilter<TInputMesh, TOutputMesh>
37{
38public:
39 ITK_DISALLOW_COPY_AND_MOVE(CleanQuadEdgeMeshFilter);
40
45
47 itkOverrideGetNameOfClassMacro(CleanQuadEdgeMeshFilter);
48
50 itkNewMacro(Self);
51
52 using InputMeshType = TInputMesh;
53 using typename Superclass::InputMeshPointer;
54 using typename Superclass::InputCoordRepType;
55 using typename Superclass::InputPointType;
56 using typename Superclass::InputPointIdentifier;
57 using typename Superclass::InputQEPrimal;
58 using typename Superclass::InputVectorType;
59
60 using typename Superclass::InputEdgeCellType;
61 using typename Superclass::InputPolygonCellType;
62 using typename Superclass::InputPointIdList;
63 using typename Superclass::InputCellTraits;
64 using typename Superclass::InputPointsIdInternalIterator;
65 using typename Superclass::InputQEIterator;
66
67 using InputPointsContainer = typename InputMeshType::PointsContainer;
68 using InputPointsContainerPointer = typename InputMeshType::PointsContainerPointer;
69 using InputPointsContainerIterator = typename InputMeshType::PointsContainerIterator;
70
71 using InputCellsContainerIterator = typename InputMeshType::CellsContainerIterator;
72
73 static constexpr unsigned int PointDimension = InputMeshType::PointDimension;
74
75 using OutputMeshType = TOutputMesh;
76 using typename Superclass::OutputMeshPointer;
77 using typename Superclass::OutputCoordRepType;
78 using typename Superclass::OutputPointType;
79 using typename Superclass::OutputPointIdentifier;
80 using typename Superclass::OutputQEPrimal;
81 using typename Superclass::OutputVectorType;
82
83 using OutputQEType = typename OutputMeshType::QEType;
84 using OutputPointsContainer = typename OutputMeshType::PointsContainer;
85 using OutputPointsContainerPointer = typename OutputMeshType::PointsContainerPointer;
86 using OutputPointsContainerIterator = typename OutputMeshType::PointsContainerIterator;
87
88 using OutputCellsContainerIterator = typename OutputMeshType::CellsContainerIterator;
89
92
94
97
100
102 itkSetMacro(AbsoluteTolerance, InputCoordRepType);
103 itkGetConstMacro(AbsoluteTolerance, InputCoordRepType);
107 itkSetClampMacro(RelativeTolerance, InputCoordRepType, 0.0, 1.0);
108 itkGetConstMacro(RelativeTolerance, InputCoordRepType);
111protected:
113
114 ~CleanQuadEdgeMeshFilter() override = default;
115
116 void
117 GenerateData() override;
118
119 virtual void
120 MergePoints(const InputCoordRepType absoluteToleranceSquared);
121
122 virtual void
124
125 void
126 PrintSelf(std::ostream & os, Indent indent) const override;
127
128private:
129 InputCoordRepType m_AbsoluteTolerance{};
130 InputCoordRepType m_RelativeTolerance{};
131
132 BoundingBoxPointer m_BoundingBox{};
133 CriterionPointer m_Criterion{};
134 DecimationPointer m_Decimation{};
135};
136} // end namespace itk
137
138#ifndef ITK_MANUAL_INSTANTIATION
139# include "itkCleanQuadEdgeMeshFilter.hxx"
140#endif
141
142#endif
Represent and compute information about bounding boxes.
typename InputMeshType::PointsContainer InputPointsContainer
typename CriterionType::Pointer CriterionPointer
void PrintSelf(std::ostream &os, Indent indent) const override
typename OutputMeshType::PointsContainerPointer OutputPointsContainerPointer
typename BoundingBoxType::Pointer BoundingBoxPointer
typename OutputMeshType::PointsContainerIterator OutputPointsContainerIterator
typename OutputMeshType::CellsContainerIterator OutputCellsContainerIterator
typename OutputMeshType::QEType OutputQEType
virtual void MergePoints(const InputCoordRepType absoluteToleranceSquared)
typename OutputMeshType::PointsContainer OutputPointsContainer
void GenerateData() override
typename InputMeshType::PointsContainerPointer InputPointsContainerPointer
typename InputMeshType::CellsContainerIterator InputCellsContainerIterator
typename InputMeshType::PointsContainerIterator InputPointsContainerIterator
typename DecimationType::Pointer DecimationPointer
~CleanQuadEdgeMeshFilter() override=default
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....