ITK  5.2.0
Insight Toolkit
itkQuadraticTriangleCell.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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
39  : public TCellInterface
41 {
42 public:
43  ITK_DISALLOW_COPY_AND_MOVE(QuadraticTriangleCell);
44 
47  itkCellInheritedTypedefs(TCellInterface);
49 
51  itkTypeMacro(QuadraticTriangleCell, CellInterface);
52 
55  using VertexAutoPointer = typename VertexType::SelfAutoPointer;
56 
59  using EdgeAutoPointer = typename EdgeType::SelfAutoPointer;
60 
62  static constexpr unsigned int NumberOfPoints = 6;
63  static constexpr unsigned int NumberOfVertices = 3;
64  static constexpr unsigned int NumberOfEdges = 3;
65  static constexpr unsigned int CellDimension = 2;
66 
69  GetType() const override
70  {
72  }
73  void
74  MakeCopy(CellAutoPointer &) const override;
76 
77  unsigned int
78  GetDimension() const override;
79 
80  unsigned int
81  GetNumberOfPoints() const override;
82 
83  CellFeatureCount
84  GetNumberOfBoundaryFeatures(int dimension) const override;
85 
86  bool
87  GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override;
88  void
89  SetPointIds(PointIdConstIterator first) override;
90 
91  void
92  SetPointIds(PointIdConstIterator first, PointIdConstIterator last) override;
93 
94  void
95  SetPointId(int localId, PointIdentifier) override;
96  PointIdIterator
97  PointIdsBegin() override;
98 
99  PointIdConstIterator
100  PointIdsBegin() const override;
101 
102  PointIdIterator
103  PointIdsEnd() override;
104 
105  PointIdConstIterator
106  PointIdsEnd() const override;
107 
109  virtual CellFeatureCount
110  GetNumberOfVertices() const;
111 
112  virtual CellFeatureCount
113  GetNumberOfEdges() const;
114 
115  virtual bool
116  GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
117  virtual bool
118  GetEdge(CellFeatureIdentifier, EdgeAutoPointer &);
119 
122 
126  void
127  EvaluateShapeFunctions(const ParametricCoordArrayType & parametricCoordinates,
128  ShapeFunctionsArrayType & weights) const override;
129 
130 public:
132  {
133  for (PointIdentifier i = 0; i < Self::NumberOfPoints; i++)
134  {
135  m_PointIds[i] = NumericTraits<PointIdentifier>::max();
136  }
137  }
138 
139  ~QuadraticTriangleCell() override = default;
140 
141 protected:
143  PointIdentifier m_PointIds[NumberOfPoints];
144 };
145 } // end namespace itk
146 
147 #ifndef ITK_MANUAL_INSTANTIATION
148 # include "itkQuadraticTriangleCell.hxx"
149 #endif
150 
151 #endif
itk::VertexCell
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:39
itkCellVisitMacro
#define itkCellVisitMacro(TopologyId)
Definition: itkCellInterface.h:32
itk::CommonEnums::CellGeometry::QUADRATIC_TRIANGLE_CELL
itk::QuadraticTriangleCellTopology
QuadraticTriangleCellTopology holds data defining the topological connections of the vertices and edg...
Definition: itkQuadraticTriangleCellTopology.h:36
itk::QuadraticTriangleCell::QuadraticTriangleCell
QuadraticTriangleCell()
Definition: itkQuadraticTriangleCell.h:131
itk::QuadraticEdgeCell
Represents a second order line segment for a Mesh.
Definition: itkQuadraticEdgeCell.h:37
itk::QuadraticTriangleCell::GetType
CellGeometryEnum GetType() const override
Definition: itkQuadraticTriangleCell.h:69
itk::QuadraticTriangleCell::EdgeAutoPointer
typename EdgeType::SelfAutoPointer EdgeAutoPointer
Definition: itkQuadraticTriangleCell.h:59
itkCellInheritedTypedefs
#define itkCellInheritedTypedefs(superclassArg)
Definition: itkCellInterface.h:55
itkQuadraticTriangleCellTopology.h
itk::CommonEnums::CellGeometry
CellGeometry
Definition: itkCommonEnums.h:138
itk::NumericTraits::max
static constexpr T max(const T &)
Definition: itkNumericTraits.h:167
itk::CellInterface
An abstract interface for cells.
Definition: itkCellInterface.h:96
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkQuadraticEdgeCell.h
itk::QuadraticTriangleCell::VertexAutoPointer
typename VertexType::SelfAutoPointer VertexAutoPointer
Definition: itkQuadraticTriangleCell.h:55
itk::QuadraticTriangleCell
Represents a second order triangular patch for a Mesh.
Definition: itkQuadraticTriangleCell.h:38
itkCellCommonTypedefs
#define itkCellCommonTypedefs(celltype)
Definition: itkCellInterface.h:46