ITK  6.0.0
Insight Toolkit
itkQuadEdgeMeshEulerOperatorJoinVertexFunction.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 itkQuadEdgeMeshEulerOperatorJoinVertexFunction_h
19 #define itkQuadEdgeMeshEulerOperatorJoinVertexFunction_h
20 
22 
23 #include <stack>
24 
25 namespace itk
26 {
56 template <typename TMesh, typename TQEType>
58  : public QuadEdgeMeshFunctionBase<TMesh, TQEType *>
59 {
60 public:
61  ITK_DISALLOW_COPY_AND_MOVE(QuadEdgeMeshEulerOperatorJoinVertexFunction);
62 
68 
69  itkNewMacro(Self);
71  itkOverrideGetNameOfClassMacro(QuadEdgeMeshEulerOperatorJoinVertexFunction);
72 
74  using QEType = TQEType;
75 
76  using typename Superclass::MeshType;
77  using typename Superclass::OutputType;
78 
79  using PointIdentifier = typename MeshType::PointIdentifier;
80  using CellIdentifier = typename MeshType::CellIdentifier;
81  using FaceRefType = typename MeshType::FaceRefType;
82 
84  virtual OutputType
85  Evaluate(QEType * e);
86 
88  {
89  STANDARD_CONFIG = 0,
90  EDGE_NULL, // 1
91  MESH_NULL, // 2
98  EYE_CONFIG, // 9
99  EDGE_JOINING_DIFFERENT_BORDERS // 10
100  };
101 
102  itkGetConstMacro(OldPointID, PointIdentifier);
103  itkGetConstMacro(EdgeStatus, EdgeStatusType);
104 
105 protected:
107  ~QuadEdgeMeshEulerOperatorJoinVertexFunction() override = default;
108 
109  void
110  PrintSelf(std::ostream & os, Indent indent) const override;
111 
112  PointIdentifier m_OldPointID{};
113 
114  EdgeStatusType m_EdgeStatus{};
115 
122  PointIdentifier
123  CommonVertexNeighboor(QEType * e);
124 
131  bool
132  IsTetrahedron(QEType * e);
133 
142  bool
143  IsFaceIsolated(QEType * e, const bool iWasLeftFace, std::stack<TQEType *> & oToBeDeleted);
144 
145  bool
146  IsSamosa(QEType * e);
147 
148  bool
149  IsEye(QEType * e);
150 
151  bool
152  IsEdgeLinkingTwoDifferentBorders(QEType * e);
153 
154  EdgeStatusType
155  CheckStatus(QEType * e, std::stack<TQEType *> & oToBeDeleted);
156 
157  QEType *
158  Process(QEType * e);
159 
160  QEType *
161  ProcessIsolatedQuadEdge(QEType * e);
162 
163  QEType *
164  ProcessIsolatedFace(QEType * e, std::stack<QEType *> & EdgesToBeDeleted);
165 };
166 } // end namespace itk
167 
168 #include "itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx"
169 
170 #endif
itk::QuadEdgeMeshEulerOperatorJoinVertexFunction::QUADEDGE_ISOLATED
Definition: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h:95
itk::QuadEdgeMeshEulerOperatorJoinVertexFunction::QEType
TQEType QEType
Definition: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h:74
itk::QuadEdgeMeshEulerOperatorJoinVertexFunction::EDGE_ISOLATED
Definition: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h:92
itk::QuadEdgeMeshEulerOperatorJoinVertexFunction::EDGE_NULL
Definition: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h:90
itk::QuadEdgeMeshEulerOperatorJoinVertexFunction::FaceRefType
typename MeshType::FaceRefType FaceRefType
Definition: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h:81
itk::QuadEdgeMeshEulerOperatorJoinVertexFunction::TETRAHEDRON_CONFIG
Definition: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h:94
itk::QuadEdgeMeshFunctionBase
Base class for mesh function object modifiers.
Definition: itkQuadEdgeMeshFunctionBase.h:55
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::QuadEdgeMeshEulerOperatorJoinVertexFunction::TOO_MANY_COMMON_VERTICES
Definition: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h:93
itk::QuadEdgeMeshEulerOperatorJoinVertexFunction::CellIdentifier
typename MeshType::CellIdentifier CellIdentifier
Definition: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h:80
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::QuadEdgeMeshEulerOperatorJoinVertexFunction::EdgeStatusType
EdgeStatusType
Definition: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h:87
itkQuadEdgeMeshFunctionBase.h
itk::QuadEdgeMeshEulerOperatorJoinVertexFunction::PointIdentifier
typename MeshType::PointIdentifier PointIdentifier
Definition: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h:79
itk::QuadEdgeMeshEulerOperatorJoinVertexFunction::MESH_NULL
Definition: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h:91
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::QuadEdgeMeshEulerOperatorJoinVertexFunction
Collapse a given edge by joining its dest and its org.
Definition: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h:57
itk::Math::e
static constexpr double e
Definition: itkMath.h:56
itk::QuadEdgeMeshEulerOperatorJoinVertexFunction::EYE_CONFIG
Definition: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h:98
itk::QuadEdgeMeshFunctionBase< TMesh, TQEType * >::OutputType
TQEType * OutputType
Definition: itkQuadEdgeMeshFunctionBase.h:74
itk::QuadEdgeMeshEulerOperatorJoinVertexFunction::FACE_ISOLATED
Definition: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h:96
itk::QuadEdgeMeshEulerOperatorJoinVertexFunction::SAMOSA_CONFIG
Definition: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h:97