ITK  4.2.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< class TMesh, class TQEType >
58  public QuadEdgeMeshFunctionBase< TMesh, TQEType * >
59 {
60 public:
61 
67 
68  itkNewMacro(Self);
71 
73  typedef TQEType QEType;
74 
75  typedef typename Superclass::MeshType MeshType;
76  typedef typename Superclass::OutputType OutputType;
77 
78  typedef typename MeshType::PointIdentifier PointIdentifier;
79  typedef typename MeshType::CellIdentifier CellIdentifier;
80  typedef typename MeshType::FaceRefType FaceRefType;
81 
83  virtual OutputType Evaluate(QEType *h);
84 
86  STANDARD_CONFIG = 0,
87  EDGE_NULL, //1
88  MESH_NULL, //2
96  EDGE_JOINING_DIFFERENT_BORDERS //10
97  };
98 
99  itkGetConstMacro(OldPointID, PointIdentifier);
100  itkGetConstMacro(EdgeStatus, EdgeStatusType);
101 protected:
104 
105  void PrintSelf(std::ostream & os, Indent indent) const;
106 
108 
110 
117  PointIdentifier CommonVertexNeighboor(QEType *e);
118 
125  bool IsTetrahedron(QEType *e);
126 
135  bool IsFaceIsolated(QEType *e, const bool & iWasLeftFace,
136  std::stack< TQEType * > & oToBeDeleted);
137 
138  bool IsSamosa(QEType *e);
139 
140  bool IsEye(QEType *e);
141 
142  bool IsEdgeLinkingTwoDifferentBorders(QEType *e);
143 
144  EdgeStatusType CheckStatus(QEType *e, std::stack< TQEType * > & oToBeDeleted);
145 
146  QEType * Process(QEType *e);
147 
148  QEType * ProcessIsolatedQuadEdge(QEType *e);
149 
150  QEType * ProcessIsolatedFace(QEType *e, std::stack< QEType * > & EdgesToBeDeleted
151  );
152 
153 private:
154  QuadEdgeMeshEulerOperatorJoinVertexFunction(const Self &); //purposely not
155  // implemented
156  void operator=(const Self &); //purposely not
157 
158  // implemented
159 };
160 } // namespace itk
161 
162 #include "itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx"
163 
164 #endif
165 
166 // eof - itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h
167