ITK  5.4.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 {
40 template <typename TCellInterface>
41 class ITK_TEMPLATE_EXPORT QuadraticTriangleCell
42  : public TCellInterface
44 {
45 public:
46  ITK_DISALLOW_COPY_AND_MOVE(QuadraticTriangleCell);
47 
50  itkCellInheritedTypedefs(TCellInterface);
55 
58  using VertexAutoPointer = typename VertexType::SelfAutoPointer;
59 
62  using EdgeAutoPointer = typename EdgeType::SelfAutoPointer;
63 
65  static constexpr unsigned int NumberOfPoints = 6;
66  static constexpr unsigned int NumberOfVertices = 3;
67  static constexpr unsigned int NumberOfEdges = 3;
68  static constexpr unsigned int CellDimension = 2;
69 
72  GetType() const override
73  {
75  }
76  void
77  MakeCopy(CellAutoPointer &) const override;
80  unsigned int
81  GetDimension() const override;
82 
83  unsigned int
84  GetNumberOfPoints() const override;
85 
86  CellFeatureCount
87  GetNumberOfBoundaryFeatures(int dimension) const override;
88 
89  bool
90  GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override;
91  void
92  SetPointIds(PointIdConstIterator first) override;
93 
94  void
95  SetPointIds(PointIdConstIterator first, PointIdConstIterator last) override;
96 
97  void
98  SetPointId(int localId, PointIdentifier) override;
99  PointIdIterator
100  PointIdsBegin() override;
101 
102  PointIdConstIterator
103  PointIdsBegin() const override;
104 
105  PointIdIterator
106  PointIdsEnd() override;
107 
108  PointIdConstIterator
109  PointIdsEnd() const override;
110 
112  virtual CellFeatureCount
113  GetNumberOfVertices() const;
114 
115  virtual CellFeatureCount
116  GetNumberOfEdges() const;
117 
118  virtual bool
119  GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
120  virtual bool
121  GetEdge(CellFeatureIdentifier, EdgeAutoPointer &);
122 
125 
129  void
130  EvaluateShapeFunctions(const ParametricCoordArrayType & parametricCoordinates,
131  ShapeFunctionsArrayType & weights) const override;
132 
133 public:
134  QuadraticTriangleCell() = default;
135 
136  ~QuadraticTriangleCell() override = default;
137 
138 protected:
140  std::array<PointIdentifier, NumberOfPoints> m_PointIds{ MakeFilled<std::array<PointIdentifier, NumberOfPoints>>(
142 };
143 } // end namespace itk
144 
145 #ifndef ITK_MANUAL_INSTANTIATION
146 # include "itkQuadraticTriangleCell.hxx"
147 #endif
148 
149 #endif
itk::VertexCell
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:42
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:40
itk::QuadraticTriangleCell::GetType
CellGeometryEnum GetType() const override
Definition: itkQuadraticTriangleCell.h:72
itkOverrideGetNameOfClassMacro
itkOverrideGetNameOfClassMacro(AddImageFilter)
itk::QuadraticTriangleCell::EdgeAutoPointer
typename EdgeType::SelfAutoPointer EdgeAutoPointer
Definition: itkQuadraticTriangleCell.h:62
itkCellInheritedTypedefs
#define itkCellInheritedTypedefs(superclassArg)
Definition: itkCellInterface.h:55
itkMakeFilled.h
itkQuadraticTriangleCellTopology.h
itk::CommonEnums::CellGeometry
CellGeometry
Definition: itkCommonEnums.h:138
itk::NumericTraits::max
static constexpr T max(const T &)
Definition: itkNumericTraits.h:168
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:58
itk::QuadraticTriangleCell
Represents a second order triangular patch for a Mesh.
Definition: itkQuadraticTriangleCell.h:41
itkCellCommonTypedefs
#define itkCellCommonTypedefs(celltype)
Definition: itkCellInterface.h:46