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 
28 namespace itk
29 {
35 template <typename TInputMesh, typename TOutputMesh = TInputMesh>
36 class ITK_TEMPLATE_EXPORT CleanQuadEdgeMeshFilter : public QuadEdgeMeshToQuadEdgeMeshFilter<TInputMesh, TOutputMesh>
37 {
38 public:
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 
90  using BoundingBoxType =
92 
94 
97 
100 
102  itkSetMacro(AbsoluteTolerance, InputCoordRepType);
103  itkGetConstMacro(AbsoluteTolerance, InputCoordRepType);
107  itkSetClampMacro(RelativeTolerance, InputCoordRepType, 0.0, 1.0);
108  itkGetConstMacro(RelativeTolerance, InputCoordRepType);
111 protected:
113 
114  ~CleanQuadEdgeMeshFilter() override = default;
115 
116  void
117  GenerateData() override;
118 
119  virtual void
120  MergePoints(const InputCoordRepType absoluteToleranceSquared);
121 
122  virtual void
123  CleanPoints();
124 
125  void
126  PrintSelf(std::ostream & os, Indent indent) const override;
127 
128 private:
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
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::CleanQuadEdgeMeshFilter::CriterionPointer
typename CriterionType::Pointer CriterionPointer
Definition: itkCleanQuadEdgeMeshFilter.h:96
itk::MaxMeasureBoundCriterion
Definition: itkQuadEdgeMeshDecimationCriteria.h:205
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputPointsContainerPointer
typename OutputMeshType::PointsContainerPointer OutputPointsContainerPointer
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:86
itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.h
itk::SmartPointer< Self >
itk::CleanQuadEdgeMeshFilter::InputCellsContainerIterator
typename InputMeshType::CellsContainerIterator InputCellsContainerIterator
Definition: itkCleanQuadEdgeMeshFilter.h:71
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::CleanQuadEdgeMeshFilter::DecimationPointer
typename DecimationType::Pointer DecimationPointer
Definition: itkCleanQuadEdgeMeshFilter.h:99
itk::SquaredEdgeLengthDecimationQuadEdgeMeshFilter
Definition: itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.h:31
itkQuadEdgeMeshToQuadEdgeMeshFilter.h
itk::MeshToMeshFilter::InputMeshType
TInputMesh InputMeshType
Definition: itkMeshToMeshFilter.h:65
itk::CleanQuadEdgeMeshFilter::OutputQEType
typename OutputMeshType::QEType OutputQEType
Definition: itkCleanQuadEdgeMeshFilter.h:83
itk::CleanQuadEdgeMeshFilter::OutputPointsContainer
typename OutputMeshType::PointsContainer OutputPointsContainer
Definition: itkCleanQuadEdgeMeshFilter.h:84
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::CleanQuadEdgeMeshFilter::OutputCellsContainerIterator
typename OutputMeshType::CellsContainerIterator OutputCellsContainerIterator
Definition: itkCleanQuadEdgeMeshFilter.h:88
itk::CleanQuadEdgeMeshFilter
TODO.
Definition: itkCleanQuadEdgeMeshFilter.h:36
itk::CleanQuadEdgeMeshFilter::InputPointsContainer
typename InputMeshType::PointsContainer InputPointsContainer
Definition: itkCleanQuadEdgeMeshFilter.h:67
itk::QuadEdgeMeshToQuadEdgeMeshFilter
Duplicates the content of a Mesh.
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:37
itkIntTypes.h
itk::CleanQuadEdgeMeshFilter::InputPointsContainerPointer
typename InputMeshType::PointsContainerPointer InputPointsContainerPointer
Definition: itkCleanQuadEdgeMeshFilter.h:68
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::QuadEdgeMeshToQuadEdgeMeshFilter::InputCoordRepType
typename InputMeshType::CoordRepType InputCoordRepType
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:52
itk::CleanQuadEdgeMeshFilter::BoundingBoxPointer
typename BoundingBoxType::Pointer BoundingBoxPointer
Definition: itkCleanQuadEdgeMeshFilter.h:93
itk::MeshSource::OutputMeshType
TOutputMesh OutputMeshType
Definition: itkMeshSource.h:68
itk::BoundingBox
Represent and compute information about bounding boxes.
Definition: itkBoundingBox.h:70
itk::CleanQuadEdgeMeshFilter::InputPointsContainerIterator
typename InputMeshType::PointsContainerIterator InputPointsContainerIterator
Definition: itkCleanQuadEdgeMeshFilter.h:69
itk::QuadEdgeMeshToQuadEdgeMeshFilter::OutputPointsContainerIterator
typename OutputMeshType::PointsContainerIterator OutputPointsContainerIterator
Definition: itkQuadEdgeMeshToQuadEdgeMeshFilter.h:85
itkQuadEdgeMeshDecimationCriteria.h
itkBoundingBox.h