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: 2009-04-23 03:43:42 $
00007   Version:   $Revision: 1.19 $
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, //1
00087     MESH_NULL, //2
00088     EDGE_ISOLATED, //3
00089     TOO_MANY_COMMON_VERTICES, //4
00090     TETRAHEDRON_CONFIG, //5
00091     QUADEDGE_ISOLATED, //6
00092     FACE_ISOLATED, //7
00093     SAMOSA_CONFIG, //8
00094     EYE_CONFIG, //9
00095     EDGE_JOINING_DIFFERENT_BORDERS //10
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& ); //purposely not implemented
00151   void operator=(const Self& );        //purposely not implemented
00152 
00153 };
00154 
00155 } // namespace itk
00156 
00157 #include "itkQuadEdgeMeshEulerOperatorJoinVertexFunction.txx"
00158 
00159 #endif
00160 
00161 // eof - $RCSfile: itkQuadEdgeMeshEulerOperatorJoinVertexFunction.h,v $
00162 

Generated at Tue Sep 15 04:27:24 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000