ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkQuadEdgeMeshEulerOperatorJoinVertexFunction.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 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_ASSIGN(QuadEdgeMeshEulerOperatorJoinVertexFunction);
62 
68 
69  itkNewMacro(Self);
72 
74  using QEType = TQEType;
75 
76  using MeshType = typename Superclass::MeshType;
77  using OutputType = 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 Evaluate(QEType *h);
85 
87  STANDARD_CONFIG = 0,
88  EDGE_NULL, //1
89  MESH_NULL, //2
97  EDGE_JOINING_DIFFERENT_BORDERS //10
98  };
99 
100  itkGetConstMacro(OldPointID, PointIdentifier);
101  itkGetConstMacro(EdgeStatus, EdgeStatusType);
102 
103 protected:
105  ~QuadEdgeMeshEulerOperatorJoinVertexFunction() override = default;
106 
107  void PrintSelf(std::ostream & os, Indent indent) const override;
108 
110 
112 
119  PointIdentifier CommonVertexNeighboor(QEType *e);
120 
127  bool IsTetrahedron(QEType *e);
128 
137  bool IsFaceIsolated(QEType *e, const bool & iWasLeftFace,
138  std::stack< TQEType * > & oToBeDeleted);
139 
140  bool IsSamosa(QEType *e);
141 
142  bool IsEye(QEType *e);
143 
144  bool IsEdgeLinkingTwoDifferentBorders(QEType *e);
145 
146  EdgeStatusType CheckStatus(QEType *e, std::stack< TQEType * > & oToBeDeleted);
147 
148  QEType * Process(QEType *e);
149 
150  QEType * ProcessIsolatedQuadEdge(QEType *e);
151 
152  QEType * ProcessIsolatedFace(QEType *e, std::stack< QEType * > & EdgesToBeDeleted
153  );
154 };
155 } // end namespace itk
156 
157 #include "itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx"
158 
159 #endif
Light weight base class for most itk classes.
Collapse a given edge by joining its dest and its org.
static constexpr double e
The base of the natural logarithm or Euler&#39;s number
Definition: itkMath.h:53
Control indentation during Print() invocation.
Definition: itkIndent.h:49