00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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&);
00111 void operator=(const Self&);
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 }
00136
00137 #ifndef ITK_MANUAL_INSTANTIATION
00138 #include "itkTetrahedronCell.txx"
00139 #endif
00140
00141 #endif