Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-03 21:13:17 $
00007   Version:   $Revision: 1.16 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
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 //FIXME http://www.cgal.org/Manual/doc_html/cgal_manual/Polyhedron_ref/Class_Polyhedron_3.html
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     TETRAEDRON_CONFIG,
00091     QUADEDGE_ISOLATED,
00092     FACE_ISOLATED,
00093     SAMOSA_CONFIG,
00094     EYE_CONFIG,
00095     EDGE_JOINING_DIFFERENT_BORDERS
00096     };
00097 
00098   itkGetMacro( OldPointID, PointIdentifier );
00099   itkGetMacro( 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 IsTetraedron( 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 private:
00149   QuadEdgeMeshEulerOperatorJoinVertexFunction(const Self& ); //purposely not implemented
00150   void operator=(const Self& );        //purposely not implemented
00151 
00152 };
00153 
00154 } // namespace itk
00155 
00156 #include "itkQuadEdgeMeshEulerOperatorJoinVertexFunction.txx"
00157 
00158 #endif
00159 
00160 // eof - $RCSfile: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h,v $
00161 

Generated at Wed Nov 5 23:41:27 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000