KWStyle - itkQuadraticTriangleCell.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkQuadraticTriangleCell.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 __itkQuadraticTriangleCell_h
18 #define __itkQuadraticTriangleCell_h
19
20 #include "itkCellInterface.h"
21 #include "itkQuadraticEdgeCell.h"
22 #include "itkQuadraticTriangleCellTopology.h"
23
24 namespace itk
25 {
26
27 /** \class QuadraticTriangleCell
28  * QuadraticTriangleCell represents a second order triangular patch for a Mesh.
29  *
30  * Template parameters for QuadraticTriangleCell:
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 QuadraticTriangleCell: public TCellInterface, private QuadraticTriangleCellTopology
44 {
45 public:
46   /** Standard class typedefs. */
47   itkCellCommonTypedefs(QuadraticTriangleCell);
48   itkCellInheritedTypedefs(TCellInterface);
49
50   /** Standard part of every itk Object. */
51   itkTypeMacro(QuadraticTriangleCell, 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 QuadraticEdgeCell< TCellInterface >   EdgeType;
59   typedef typename EdgeType::SelfAutoPointer    EdgeAutoPointer;
60     
61   /** Triangle-specific topology numbers. */
62   itkStaticConstMacro(NumberOfPoints, unsigned int, 6);
63   itkStaticConstMacro(NumberOfVertices, unsigned int, 3);
64   itkStaticConstMacro(NumberOfEdges, unsigned int, 3);
65   itkStaticConstMacro(CellDimension, unsigned int, 2);
66   
67   /** Implement the standard CellInterface. */
68   virtual CellGeometry GetType(void) const 
69     {return Superclass::QUADRATIC_TRIANGLE_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   /** Triangle-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   /** Cell visitor interface. */
91   itkCellVisitMacro(Superclass::QUADRATIC_TRIANGLE_CELL);
92
93
94   /** Given the parametric coordinates of a point in the cell
95    *  determine the value of its Shape Functions
96    *  returned through an itkArray<InterpolationWeightType>).  */
97   virtual void EvaluateShapeFunctions( 
98 LEN                           const ParametricCoordArrayType & parametricCoordinates,
99                                 ShapeFunctionsArrayType  & weights) const;
100
101
102 EML
103 IND *public:
104   QuadraticTriangleCell() {}
105   ~QuadraticTriangleCell() {}
106
107 IND *protected:
108   /** Store the number of points needed for a triangle. */
109   PointIdentifier m_PointIds[NumberOfPoints];
110
111 IND *private:
112   QuadraticTriangleCell(const Self&); //purposely not implemented
113   void operator=(const Self&); //purposely not implemented
114 };
115
116 // end namespace itk
117
118 #ifndef ITK_MANUAL_INSTANTIATION
119 #include "itkQuadraticTriangleCell.txx"
120 #endif
121
122 #endif
123

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