KWStyle - itkQuadrilateralCell.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkQuadrilateralCell.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:46 $
7   Version:   $Revision: 1.4 $
8
9   Copyright (c) Insight Software Consortium. All rights reserved.
10   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12      This software is distributed WITHOUT ANY WARRANTY; without even 
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14      PURPOSE.  See the above copyright notices for more information.
15
16 =========================================================================*/
17 #ifndef __itkQuadrilateralCell_h
18 #define __itkQuadrilateralCell_h
19
20 #include "itkCellInterface.h"
21 #include "itkLineCell.h"
22 #include "itkQuadrilateralCellTopology.h"
23
24 namespace itk
25 {
26
27 /** \class QuadrilateralCell
28  * QuadrilateralCell represents a quadrilateral for a Mesh.
29  *
30  * Template parameters for QuadrilateralCell:
31  *
32  * TPixelType =
33  *     The type associated with a point, cell, or boundary for use in storing
34  *     its data.
35  *
36  * TCellTraits =
37  *     Type information of mesh containing cell.
38  *
39  * \ingroup MeshObjects
40  */
41
42 template < typename TCellInterface >
43 LEN class ITK_EXPORT QuadrilateralCell: public TCellInterface, private QuadrilateralCellTopology
44 {
45 public:
46   /** Standard class typedefs. */
47   itkCellCommonTypedefs(QuadrilateralCell);
48   itkCellInheritedTypedefs(TCellInterface);
49
50   /** Standard part of every itk Object. */
51   itkTypeMacro(QuadrilateralCell, CellInterface);
52
53   /** The type of boundary for this triangle's vertices. */
54   typedef VertexCell< TCellInterface >            VertexType;
55   typedef typename VertexType::SelfAutoPointer    VertexAutoPointer;
56   
57   /** The type of boundary for this triangle's edges. */
58   typedef LineCell< TCellInterface >              EdgeType;
59   typedef typename EdgeType::SelfAutoPointer      EdgeAutoPointer;
60  
61   /** Quadrilateral-specific topology numbers. */
62   itkStaticConstMacro(NumberOfPoints, unsigned int, 4);
63   itkStaticConstMacro(NumberOfVertices, unsigned int, 4);
64   itkStaticConstMacro(NumberOfEdges, unsigned int, 4);
65   itkStaticConstMacro(CellDimension, unsigned int, 2);
66   
67   /** Implement the standard CellInterface. */
68   virtual CellGeometry GetType(void) const 
69     {return Superclass::QUADRILATERAL_CELL;}
70   virtual void MakeCopy( CellAutoPointer & ) const;
71   virtual unsigned int GetDimension(void) const;
72   virtual unsigned int GetNumberOfPoints(void) const;
73   virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const;
74 LEN   virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier,CellAutoPointer &);
75   virtual void SetPointIds(PointIdConstIterator first);
76   virtual void SetPointIds(PointIdConstIterator first,
77                            PointIdConstIterator last);
78   virtual void SetPointId(int localId, PointIdentifier);
79   virtual PointIdIterator      PointIdsBegin(void);
80   virtual PointIdConstIterator PointIdsBegin(void) const;
81   virtual PointIdIterator      PointIdsEnd(void);
82   virtual PointIdConstIterator PointIdsEnd(void) const; 
83   
84   /** Quadrilateral-specific interface. */
85   virtual CellFeatureCount GetNumberOfVertices(void) const;
86   virtual CellFeatureCount GetNumberOfEdges(void) const;
87   virtual bool GetVertex(CellFeatureIdentifier,VertexAutoPointer &);
88   virtual bool GetEdge(CellFeatureIdentifier,EdgeAutoPointer &);
89   
90   /** Visitor interface */
91   itkCellVisitMacro(Superclass::QUADRILATERAL_CELL);
92
93   /** Constructor and destructor */
94   QuadrilateralCell() {};
95   ~QuadrilateralCell() {};
96
97 protected:
98   /** Store the number of points needed for a quadrilateral. */
99   PointIdentifier m_PointIds[NumberOfPoints];
100
101 private:
102   QuadrilateralCell(const Self&); //purposely not implemented
103   void operator=(const Self&); //purposely not implemented
104
105 };
106
107
108 // end namespace itk
109
110 #ifndef ITK_MANUAL_INSTANTIATION
111 #include "itkQuadrilateralCell.txx"
112 #endif
113
114 #endif
115

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:40PM
© Kitware Inc.