ITK  6.0.0
Insight Toolkit
itkQuadraticEdgeCell.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 itkQuadraticEdgeCell_h
19 #define itkQuadraticEdgeCell_h
20 
21 #include "itkVertexCell.h"
22 #include "itkMakeFilled.h"
23 
24 #include <array>
25 
26 namespace itk
27 {
34 template <typename TCellInterface>
35 class ITK_TEMPLATE_EXPORT QuadraticEdgeCell : public TCellInterface
36 {
37 public:
38  ITK_DISALLOW_COPY_AND_MOVE(QuadraticEdgeCell);
39 
42  itkCellInheritedTypedefs(TCellInterface);
46  itkOverrideGetNameOfClassMacro(QuadraticEdgeCell);
47 
50  using VertexAutoPointer = typename VertexType::SelfAutoPointer;
51 
53  static constexpr unsigned int NumberOfPoints = 3;
54  static constexpr unsigned int NumberOfVertices = 2;
55  static constexpr unsigned int CellDimension = 1;
56 
59  GetType() const override
60  {
62  }
63  void
64  MakeCopy(CellAutoPointer &) const override;
67  unsigned int
68  GetDimension() const override;
69 
70  unsigned int
71  GetNumberOfPoints() const override;
72 
73  CellFeatureCount
74  GetNumberOfBoundaryFeatures(int dimension) const override;
75 
76  bool
77  GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override;
78  void
79  SetPointIds(PointIdConstIterator first) override;
80 
81  void
82  SetPointIds(PointIdConstIterator first, PointIdConstIterator last) override;
83 
84  void
85  SetPointId(int localId, PointIdentifier) override;
86  PointIdIterator
87  PointIdsBegin() override;
88 
89  PointIdConstIterator
90  PointIdsBegin() const override;
91 
92  PointIdIterator
93  PointIdsEnd() override;
94 
95  PointIdConstIterator
96  PointIdsEnd() const override;
97 
99  virtual CellFeatureCount
100  GetNumberOfVertices() const;
101 
102  virtual bool
103  GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
104 
107 
108  QuadraticEdgeCell() = default;
109 
110  ~QuadraticEdgeCell() override = default;
111 
114  void
115  EvaluateShapeFunctions(const ParametricCoordArrayType & parametricCoordinates,
116  ShapeFunctionsArrayType & weights) const override;
117 
118 protected:
120  std::array<PointIdentifier, NumberOfPoints> m_PointIds{ MakeFilled<std::array<PointIdentifier, NumberOfPoints>>(
122 };
123 } // end namespace itk
124 
125 #ifndef ITK_MANUAL_INSTANTIATION
126 # include "itkQuadraticEdgeCell.hxx"
127 #endif
128 
129 #endif
itk::VertexCell
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:37
itk::CommonEnums::CellGeometry::QUADRATIC_EDGE_CELL
itk::QuadraticEdgeCell::VertexAutoPointer
typename VertexType::SelfAutoPointer VertexAutoPointer
Definition: itkQuadraticEdgeCell.h:50
itkCellVisitMacro
#define itkCellVisitMacro(TopologyId)
Definition: itkCellInterface.h:32
itk::QuadraticEdgeCell::GetType
CellGeometryEnum GetType() const override
Definition: itkQuadraticEdgeCell.h:59
itk::CommonEnums::CellGeometry
CellGeometry
Definition: itkCommonEnums.h:132
itk::QuadraticEdgeCell
Represents a second order line segment for a Mesh.
Definition: itkQuadraticEdgeCell.h:35
itkCellInheritedTypedefs
#define itkCellInheritedTypedefs(superclassArg)
Definition: itkCellInterface.h:56
itkMakeFilled.h
itk::NumericTraits::max
static constexpr T max(const T &)
Definition: itkNumericTraits.h:169
itkVertexCell.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itkCellCommonTypedefs
#define itkCellCommonTypedefs(celltype)
Definition: itkCellInterface.h:47