00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkQuadrilateralCell_h
00018 #define __itkQuadrilateralCell_h
00019
00020 #include "itkCellInterface.h"
00021 #include "itkCellBoundary.h"
00022 #include "itkLineCell.h"
00023 #include "itkQuadrilateralCellTopology.h"
00024
00025 namespace itk
00026 {
00027
00045 template < typename TCellInterface >
00046 class QuadrilateralCell: public TCellInterface, private QuadrilateralCellTopology
00047 {
00048 public:
00050 itkCellCommonTypedefs(QuadrilateralCell);
00051 itkCellInheritedTypedefs(TCellInterface);
00052
00054 itkTypeMacro(QuadrilateralCell, CellInterface);
00055
00057 typedef VertexBoundary< TCellInterface > VertexType;
00058 typedef typename VertexType::SelfAutoPointer VertexAutoPointer;
00059
00061 typedef LineBoundary< TCellInterface > EdgeType;
00062 typedef typename EdgeType::SelfAutoPointer EdgeAutoPointer;
00063
00065 itkStaticConstMacro(NumberOfPoints, unsigned int, 4);
00066 itkStaticConstMacro(NumberOfVertices, unsigned int, 4);
00067 itkStaticConstMacro(NumberOfEdges, unsigned int, 4);
00068 itkStaticConstMacro(CellDimension, unsigned int, 2);
00069
00071 virtual CellGeometry GetType(void) const
00072 {return Superclass::QUADRILATERAL_CELL;}
00073 virtual void MakeCopy( CellAutoPointer & ) const;
00074 virtual unsigned int GetDimension(void) const;
00075 virtual unsigned int GetNumberOfPoints(void) const;
00076 virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const;
00077 virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier,CellAutoPointer &);
00078 virtual void SetPointIds(PointIdConstIterator first);
00079 virtual void SetPointIds(PointIdConstIterator first,
00080 PointIdConstIterator last);
00081 virtual void SetPointId(int localId, PointIdentifier);
00082 virtual PointIdIterator PointIdsBegin(void);
00083 virtual PointIdConstIterator PointIdsBegin(void) const;
00084 virtual PointIdIterator PointIdsEnd(void);
00085 virtual PointIdConstIterator PointIdsEnd(void) const;
00086
00088 virtual CellFeatureCount GetNumberOfVertices(void) const;
00089 virtual CellFeatureCount GetNumberOfEdges(void) const;
00090 virtual bool GetVertex(CellFeatureIdentifier,VertexAutoPointer &);
00091 virtual bool GetEdge(CellFeatureIdentifier,EdgeAutoPointer &);
00092
00094 itkCellVisitMacro(QUADRILATERAL_CELL);
00095
00097 QuadrilateralCell() {};
00098 ~QuadrilateralCell() {};
00099
00100 protected:
00102 PointIdentifier m_PointIds[NumberOfPoints];
00103
00104 private:
00105 QuadrilateralCell(const Self&);
00106 void operator=(const Self&);
00107
00108 };
00109
00110
00113 template <typename TCellInterface>
00114 class QuadrilateralBoundary:
00115 public CellBoundary< QuadrilateralCell< TCellInterface > >
00116 {
00117 public:
00119 itkCellCommonTypedefs(QuadrilateralBoundary);
00120
00122 itkTypeMacro(QuadrilateralBoundary, CellBoundary);
00123
00125 QuadrilateralBoundary() {}
00126 ~QuadrilateralBoundary() {}
00127
00128 };
00129
00130 }
00131
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkQuadrilateralCell.txx"
00134 #endif
00135
00136 #endif