Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkQuadEdgeMeshEulerOperatorJoinVertexFunction_h
00018 #define __itkQuadEdgeMeshEulerOperatorJoinVertexFunction_h
00019
00020 #include "itkQuadEdgeMeshFunctionBase.h"
00021
00022 #include <stack>
00023
00024 namespace itk
00025 {
00026
00027
00054 template < class TMesh, class TQEType >
00055 class ITK_EXPORT QuadEdgeMeshEulerOperatorJoinVertexFunction :
00056 public QuadEdgeMeshFunctionBase< TMesh, TQEType* >
00057 {
00058 public:
00059
00061 typedef QuadEdgeMeshEulerOperatorJoinVertexFunction Self;
00062 typedef SmartPointer< Self > Pointer;
00063 typedef SmartPointer< const Self > ConstPointer;
00064 typedef QuadEdgeMeshFunctionBase< TMesh, TQEType* > Superclass;
00065
00066 itkNewMacro( Self );
00068 itkTypeMacro( QuadEdgeMeshEulerOperatorJoinVertexFunction, QuadEdgeMeshFunctionBase );
00069
00071 typedef TQEType QEType;
00072
00073 typedef typename Superclass::MeshType MeshType;
00074 typedef typename Superclass::OutputType OutputType;
00075
00076 typedef typename MeshType::PointIdentifier PointIdentifier;
00077 typedef typename MeshType::CellIdentifier CellIdentifier;
00078 typedef typename MeshType::FaceRefType FaceRefType;
00079
00081 virtual OutputType Evaluate( QEType* h );
00082
00083 enum EdgeStatusType
00084 {
00085 STANDARD_CONFIG = 0,
00086 EDGE_NULL,
00087 MESH_NULL,
00088 EDGE_ISOLATED,
00089 TOO_MANY_COMMON_VERTICES,
00090 TETRAHEDRON_CONFIG,
00091 QUADEDGE_ISOLATED,
00092 FACE_ISOLATED,
00093 SAMOSA_CONFIG,
00094 EYE_CONFIG,
00095 EDGE_JOINING_DIFFERENT_BORDERS
00096 };
00097
00098 itkGetConstMacro( OldPointID, PointIdentifier );
00099 itkGetConstMacro( EdgeStatus, EdgeStatusType );
00100
00101 protected:
00102 QuadEdgeMeshEulerOperatorJoinVertexFunction();
00103 ~QuadEdgeMeshEulerOperatorJoinVertexFunction() {}
00104
00105 void PrintSelf(std::ostream& os, Indent indent) const;
00106
00107 PointIdentifier m_OldPointID;
00108 EdgeStatusType m_EdgeStatus;
00109
00116 size_t CommonVertexNeighboor( QEType* e );
00117
00124 bool IsTetrahedron( QEType* e );
00125
00134 bool IsFaceIsolated( QEType* e, const bool& iWasLeftFace,
00135 std::stack< TQEType* >& oToBeDeleted );
00136
00137 bool IsSamosa( QEType* e );
00138 bool IsEye( QEType* e );
00139
00140 bool IsEdgeLinkingTwoDifferentBorders( QEType* e );
00141
00142 EdgeStatusType CheckStatus( QEType* e, std::stack< TQEType* >& oToBeDeleted );
00143
00144 QEType* Process( QEType* e );
00145 QEType* ProcessIsolatedQuadEdge( QEType* e );
00146 QEType* ProcessIsolatedFace( QEType* e, std::stack< QEType* >& EdgesToBeDeleted
00147 );
00148
00149 private:
00150 QuadEdgeMeshEulerOperatorJoinVertexFunction(const Self& );
00151 void operator=(const Self& );
00152
00153 };
00154
00155 }
00156
00157 #include "itkQuadEdgeMeshEulerOperatorJoinVertexFunction.txx"
00158
00159 #endif
00160
00161
00162