#ifndef __CPM__ALGORITHMS__QUADEDGE__MESHEULEROPERATORJOINVERTEXFUNCTION__H__ #define __CPM__ALGORITHMS__QUADEDGE__MESHEULEROPERATORJOINVERTEXFUNCTION__H__ #include #include namespace cpm { namespace Algorithms { namespace QuadEdge { /** */ template< class M > class MeshEulerOperatorJoinVertexFunction : public MeshFunctionBase< M, typename M::TPrimalEdge*, typename M::TPrimalEdge* > { public: typedef typename M::TPrimalEdge TEdge; typedef MeshEulerOperatorJoinVertexFunction Self; typedef MeshFunctionBase< M, TEdge*, TEdge* > Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef M TMesh; typedef typename Superclass::TInput TInput; typedef typename Superclass::TOutput TOutput; typedef typename M::PointIdentifier TPointId; typedef std::stack< TEdge* > TStack; enum TEdgeStatus { STANDARD_CONFIG = 0, EDGE_NULL, MESH_NULL, EDGE_ISOLATED, TOO_MANY_COMMON_VERTICES, TETRAHEDRON_CONFIG, QUADEDGE_ISOLATED, FACE_ISOLATED, SAMOSA_CONFIG, EYE_CONFIG, EDGE_JOINING_DIFFERENT_BORDERS }; public: itkNewMacro( Self ); itkTypeMacro( MeshEulerOperatorJoinVertexFunction, MeshFunctionBase ); itkGetConstMacro( OldPointID, TPointId ); itkGetConstMacro( EdgeStatus, TEdgeStatus ); public: virtual TOutput Evaluate( const TInput& e ); protected: MeshEulerOperatorJoinVertexFunction( ); virtual ~MeshEulerOperatorJoinVertexFunction( ); TPointId CommonVertexNeighboor( TEdge* e ); bool IsTetrahedron( TEdge* e ); bool IsFaceIsolated( TEdge* e, bool iWasLeftFace, TStack& oToBeDeleted ); bool IsSamosa( TEdge* e ); bool IsEye( TEdge* e ); bool IsEdgeLinkingTwoDifferentBorders( TEdge* e ); TEdgeStatus CheckStatus( TEdge* e, TStack& oToBeDeleted ); TEdge* Process( TEdge* e ); TEdge* ProcessQuadEdge( TEdge* e ); TEdge* ProcessFace( TEdge* e, TStack& EdgesToBeDeleted ); private: // Purposely not implemented MeshEulerOperatorJoinVertexFunction( const Self& ); void operator=( const Self& ); protected: TPointId m_OldPointID; TEdgeStatus m_EdgeStatus; }; } // ecapseman } // ecapseman } // ecapseman #include #endif // __CPM__ALGORITHMS__QUADEDGE__MESHEULEROPERATORJOINVERTEXFUNCTION__H__ // eof - $RCSfile$