ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkQuadraticTriangleCell.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkQuadraticTriangleCell_h
19 #define itkQuadraticTriangleCell_h
20 
21 #include "itkQuadraticEdgeCell.h"
23 
24 namespace itk
25 {
37 template< typename TCellInterface >
38 class QuadraticTriangleCell:public TCellInterface, private QuadraticTriangleCellTopology
39 {
40 public:
43  itkCellInheritedTypedefs(TCellInterface);
45 
48 
51  typedef typename VertexType::SelfAutoPointer VertexAutoPointer;
52 
55  typedef typename EdgeType::SelfAutoPointer EdgeAutoPointer;
56 
58  itkStaticConstMacro(NumberOfPoints, unsigned int, 6);
59  itkStaticConstMacro(NumberOfVertices, unsigned int, 3);
60  itkStaticConstMacro(NumberOfEdges, unsigned int, 3);
61  itkStaticConstMacro(CellDimension, unsigned int, 2);
63 
65  virtual CellGeometry GetType(void) const ITK_OVERRIDE
66  { return Superclass::QUADRATIC_TRIANGLE_CELL; }
67  virtual void MakeCopy(CellAutoPointer &) const ITK_OVERRIDE;
69 
70  virtual unsigned int GetDimension(void) const ITK_OVERRIDE;
71 
72  virtual unsigned int GetNumberOfPoints(void) const ITK_OVERRIDE;
73 
74  virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const ITK_OVERRIDE;
75 
76  virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) ITK_OVERRIDE;
77  virtual void SetPointIds(PointIdConstIterator first) ITK_OVERRIDE;
78 
79  virtual void SetPointIds(PointIdConstIterator first,
80  PointIdConstIterator last) ITK_OVERRIDE;
81 
82  virtual void SetPointId(int localId, PointIdentifier) ITK_OVERRIDE;
83  virtual PointIdIterator PointIdsBegin(void) ITK_OVERRIDE;
84 
85  virtual PointIdConstIterator PointIdsBegin(void) const ITK_OVERRIDE;
86 
87  virtual PointIdIterator PointIdsEnd(void) ITK_OVERRIDE;
88 
89  virtual PointIdConstIterator PointIdsEnd(void) const ITK_OVERRIDE;
90 
92  virtual CellFeatureCount GetNumberOfVertices() const;
93 
94  virtual CellFeatureCount GetNumberOfEdges() const;
95 
96  virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
97  virtual bool GetEdge(CellFeatureIdentifier, EdgeAutoPointer &);
98 
100  itkCellVisitMacro(Superclass::QUADRATIC_TRIANGLE_CELL);
101 
105  virtual void EvaluateShapeFunctions(
106  const ParametricCoordArrayType & parametricCoordinates,
107  ShapeFunctionsArrayType & weights) const ITK_OVERRIDE;
108 
109 public:
111  {
112  for ( PointIdentifier i = 0; i < itkGetStaticConstMacro(NumberOfPoints); i++ )
113  {
115  }
116  }
117 
119 
120 protected:
122  PointIdentifier m_PointIds[NumberOfPoints];
123 
124 private:
125  QuadraticTriangleCell(const Self &) ITK_DELETE_FUNCTION;
126  void operator=(const Self &) ITK_DELETE_FUNCTION;
127 };
128 } // end namespace itk
129 
130 #ifndef ITK_MANUAL_INSTANTIATION
131 #include "itkQuadraticTriangleCell.hxx"
132 #endif
133 
134 #endif
virtual bool GetEdge(CellFeatureIdentifier, EdgeAutoPointer &)
static const unsigned int NumberOfVertices
static const unsigned int CellDimension
virtual void SetPointIds(PointIdConstIterator first) override
virtual CellFeatureCount GetNumberOfEdges() const
EdgeType::SelfAutoPointer EdgeAutoPointer
An abstract interface for cells.
virtual void EvaluateShapeFunctions(const ParametricCoordArrayType &parametricCoordinates, ShapeFunctionsArrayType &weights) const override
virtual void MakeCopy(CellAutoPointer &) const override
virtual void SetPointId(int localId, PointIdentifier) override
itkCellInheritedTypedefs(TCellInterface)
static const unsigned int NumberOfPoints
virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &)
Represents a second order triangular patch for a Mesh.
VertexType::SelfAutoPointer VertexAutoPointer
static T max(const T &)
PointIdentifier m_PointIds[NumberOfPoints]
Represents a second order line segment for a Mesh.
virtual PointIdIterator PointIdsBegin(void) override
virtual unsigned int GetNumberOfPoints(void) const override
virtual PointIdIterator PointIdsEnd(void) override
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:39
QuadraticTriangleCellTopology holds data defining the topological connections of the vertices and edg...
virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override
itkCellCommonTypedefs(QuadraticTriangleCell)
virtual CellGeometry GetType(void) const override
itkCellVisitMacro(Superclass::QUADRATIC_TRIANGLE_CELL)
virtual CellFeatureCount GetNumberOfVertices() const
static const unsigned int NumberOfEdges
QuadraticEdgeCell< TCellInterface > EdgeType
VertexCell< TCellInterface > VertexType
virtual unsigned int GetDimension(void) const override
virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override