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

itkTetrahedronCell.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkTetrahedronCell.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:57:13 $
00007   Version:   $Revision: 1.47 $
00008 
00009   Copyright (c) 2002 Insight 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 __itkTetrahedronCell_h
00018 #define __itkTetrahedronCell_h
00019 
00020 #include "itkCellInterface.h"
00021 #include "itkCellBoundary.h"
00022 #include "itkTriangleCell.h"
00023 #include "itkTetrahedronCellTopology.h"
00024 
00025 namespace itk
00026 {
00027 
00043 template < typename TCellInterface >
00044 class TetrahedronCell: public TCellInterface, private TetrahedronCellTopology
00045 {
00046 public:
00048   itkCellCommonTypedefs(TetrahedronCell);
00049   itkCellInheritedTypedefs(TCellInterface);
00050   
00052   itkTypeMacro(TetrahedronCell, CellInterface);
00053 
00055   typedef VertexBoundary< TCellInterface >            VertexType;
00056   typedef typename VertexType::SelfAutoPointer        VertexAutoPointer;
00057   
00059   typedef LineBoundary< TCellInterface >              EdgeType;
00060   typedef typename EdgeType::SelfAutoPointer          EdgeAutoPointer;
00061   
00063   typedef TriangleBoundary< TCellInterface >          FaceType;
00064   typedef typename FaceType::SelfAutoPointer          FaceAutoPointer;
00065  
00067   itkStaticConstMacro(NumberOfPoints, unsigned int, 4);
00068   itkStaticConstMacro(NumberOfVertices, unsigned int, 4);
00069   itkStaticConstMacro(NumberOfEdges, unsigned int, 6);
00070   itkStaticConstMacro(NumberOfFaces, unsigned int, 4);
00071   itkStaticConstMacro(CellDimension, unsigned int, 3);
00072 
00074   virtual CellGeometry GetType(void) const 
00075     {return Superclass::TETRAHEDRON_CELL;}
00076   virtual void MakeCopy( CellAutoPointer & ) const;
00077   virtual unsigned int GetDimension(void) const;
00078   virtual unsigned int GetNumberOfPoints(void) const;
00079   virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const;
00080   virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &);
00081   virtual void SetPointIds(PointIdConstIterator first);
00082   virtual void SetPointIds(PointIdConstIterator first,
00083                            PointIdConstIterator last);
00084   virtual void SetPointId(int localId, PointIdentifier);
00085   virtual PointIdIterator      PointIdsBegin(void);
00086   virtual PointIdConstIterator PointIdsBegin(void) const;
00087   virtual PointIdIterator      PointIdsEnd(void);
00088   virtual PointIdConstIterator PointIdsEnd(void) const; 
00089   
00091   virtual CellFeatureCount GetNumberOfVertices(void) const;
00092   virtual CellFeatureCount GetNumberOfEdges(void) const;
00093   virtual CellFeatureCount GetNumberOfFaces(void) const;
00094   virtual bool  GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
00095   virtual bool  GetEdge(CellFeatureIdentifier, EdgeAutoPointer &);  
00096   virtual bool  GetFace(CellFeatureIdentifier, FaceAutoPointer &);  
00097   
00099   itkCellVisitMacro(TETRAHEDRON_CELL);
00100   
00101  public:
00102   TetrahedronCell() {}
00103   ~TetrahedronCell() {}
00104 
00105  protected:
00107   PointIdentifier m_PointIds[NumberOfPoints];
00108   
00109  private:
00110   TetrahedronCell(const Self&); //purposely not implemented
00111   void operator=(const Self&); //purposely not implemented
00112 
00113   };
00114 
00118 template <typename TCellInterface>
00119 class TetrahedronBoundary:
00120   public CellBoundary< TetrahedronCell< TCellInterface > >
00121 {
00122 public:
00124   itkCellCommonTypedefs(TetrahedronBoundary);
00125 
00127   itkTypeMacro(TetrahedronBoundary, CellBoundary);
00128 
00130   TetrahedronBoundary() {};
00131   ~TetrahedronBoundary() {};
00132 
00133 };
00134 
00135 } // end namespace itk
00136 
00137 #ifndef ITK_MANUAL_INSTANTIATION
00138 #include "itkTetrahedronCell.txx"
00139 #endif
00140 
00141 #endif

Generated at Wed Mar 12 01:13:11 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000