ITK  6.0.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  * https://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 #include "itkMakeFilled.h"
24 
25 #include <array>
26 
27 namespace itk
28 {
35 template <typename TCellInterface>
36 class ITK_TEMPLATE_EXPORT QuadraticTriangleCell
37  : public TCellInterface
39 {
40 public:
41  ITK_DISALLOW_COPY_AND_MOVE(QuadraticTriangleCell);
42 
45  itkCellInheritedTypedefs(TCellInterface);
49  itkOverrideGetNameOfClassMacro(QuadraticTriangleCell);
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 
67  GetType() const override
68  {
70  }
71  void
72  MakeCopy(CellAutoPointer &) const override;
75  unsigned int
76  GetDimension() const override;
77 
78  unsigned int
79  GetNumberOfPoints() const override;
80 
81  CellFeatureCount
82  GetNumberOfBoundaryFeatures(int dimension) const override;
83 
84  bool
85  GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override;
86  void
87  SetPointIds(PointIdConstIterator first) override;
88 
89  void
90  SetPointIds(PointIdConstIterator first, PointIdConstIterator last) override;
91 
92  void
93  SetPointId(int localId, PointIdentifier) override;
94  PointIdIterator
95  PointIdsBegin() override;
96 
97  PointIdConstIterator
98  PointIdsBegin() const override;
99 
100  PointIdIterator
101  PointIdsEnd() override;
102 
103  PointIdConstIterator
104  PointIdsEnd() const override;
105 
107  virtual CellFeatureCount
108  GetNumberOfVertices() const;
109 
110  virtual CellFeatureCount
111  GetNumberOfEdges() const;
112 
113  virtual bool
114  GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
115  virtual bool
116  GetEdge(CellFeatureIdentifier, EdgeAutoPointer &);
117 
120 
124  void
125  EvaluateShapeFunctions(const ParametricCoordArrayType & parametricCoordinates,
126  ShapeFunctionsArrayType & weights) const override;
127 
128 public:
129  QuadraticTriangleCell() = default;
130 
131  ~QuadraticTriangleCell() override = default;
132 
133 protected:
135  std::array<PointIdentifier, NumberOfPoints> m_PointIds{ MakeFilled<std::array<PointIdentifier, NumberOfPoints>>(
137 };
138 } // end namespace itk
139 
140 #ifndef ITK_MANUAL_INSTANTIATION
141 # include "itkQuadraticTriangleCell.hxx"
142 #endif
143 
144 #endif
itk::VertexCell
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:37
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::QuadraticEdgeCell
Represents a second order line segment for a Mesh.
Definition: itkQuadraticEdgeCell.h:35
itk::QuadraticTriangleCell::GetType
CellGeometryEnum GetType() const override
Definition: itkQuadraticTriangleCell.h:67
itk::QuadraticTriangleCell::EdgeAutoPointer
typename EdgeType::SelfAutoPointer EdgeAutoPointer
Definition: itkQuadraticTriangleCell.h:57
itkCellInheritedTypedefs
#define itkCellInheritedTypedefs(superclassArg)
Definition: itkCellInterface.h:56
itkMakeFilled.h
itkQuadraticTriangleCellTopology.h
itk::CommonEnums::CellGeometry
CellGeometry
Definition: itkCommonEnums.h:138
itk::NumericTraits::max
static constexpr T max(const T &)
Definition: itkNumericTraits.h:169
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:53
itk::QuadraticTriangleCell
Represents a second order triangular patch for a Mesh.
Definition: itkQuadraticTriangleCell.h:36
itkCellCommonTypedefs
#define itkCellCommonTypedefs(celltype)
Definition: itkCellInterface.h:47