ITK  5.0.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 ITK_TEMPLATE_EXPORT QuadraticTriangleCell:public TCellInterface, private QuadraticTriangleCellTopology
39 {
40 public:
41  ITK_DISALLOW_COPY_AND_ASSIGN(QuadraticTriangleCell);
42 
45  itkCellInheritedTypedefs(TCellInterface);
47 
49  itkTypeMacro(QuadraticTriangleCell, CellInterface);
50 
53  using VertexAutoPointer = typename VertexType::SelfAutoPointer;
54 
57  using EdgeAutoPointer = typename EdgeType::SelfAutoPointer;
58 
60  static constexpr unsigned int NumberOfPoints = 6;
61  static constexpr unsigned int NumberOfVertices = 3;
62  static constexpr unsigned int NumberOfEdges = 3;
63  static constexpr unsigned int CellDimension = 2;
64 
66  CellGeometry GetType() const override
67  { return Superclass::QUADRATIC_TRIANGLE_CELL; }
68  void MakeCopy(CellAutoPointer &) const override;
70 
71  unsigned int GetDimension() const override;
72 
73  unsigned int GetNumberOfPoints() const override;
74 
75  CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override;
76 
77  bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override;
78  void SetPointIds(PointIdConstIterator first) override;
79 
80  void SetPointIds(PointIdConstIterator first,
81  PointIdConstIterator last) override;
82 
83  void SetPointId(int localId, PointIdentifier) override;
84  PointIdIterator PointIdsBegin() override;
85 
86  PointIdConstIterator PointIdsBegin() const override;
87 
88  PointIdIterator PointIdsEnd() override;
89 
90  PointIdConstIterator PointIdsEnd() const override;
91 
93  virtual CellFeatureCount GetNumberOfVertices() const;
94 
95  virtual CellFeatureCount GetNumberOfEdges() const;
96 
97  virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
98  virtual bool GetEdge(CellFeatureIdentifier, EdgeAutoPointer &);
99 
101  itkCellVisitMacro(Superclass::QUADRATIC_TRIANGLE_CELL);
102 
106  void EvaluateShapeFunctions(
107  const ParametricCoordArrayType & parametricCoordinates,
108  ShapeFunctionsArrayType & weights) const override;
109 
110 public:
112  {
113  for ( PointIdentifier i = 0; i < Self::NumberOfPoints; i++ )
114  {
115  m_PointIds[i] = NumericTraits< PointIdentifier >::max();
116  }
117  }
118 
119  ~QuadraticTriangleCell() override = default;
120 
121 protected:
123  PointIdentifier m_PointIds[NumberOfPoints];
124 };
125 } // end namespace itk
126 
127 #ifndef ITK_MANUAL_INSTANTIATION
128 #include "itkQuadraticTriangleCell.hxx"
129 #endif
130 
131 #endif
Define numeric traits for std::vector.
typename VertexType::SelfAutoPointer VertexAutoPointer
An abstract interface for cells.
#define itkCellCommonTypedefs(celltype)
Represents a second order triangular patch for a Mesh.
CellGeometry GetType() const override
Represents a second order line segment for a Mesh.
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:39
QuadraticTriangleCellTopology holds data defining the topological connections of the vertices and edg...
#define itkCellVisitMacro(TopologyId)
#define itkCellInheritedTypedefs(superclassArg)
typename EdgeType::SelfAutoPointer EdgeAutoPointer