ITK  5.4.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 {
39 template <typename TCellInterface>
40 class ITK_TEMPLATE_EXPORT QuadraticEdgeCell : public TCellInterface
41 {
42 public:
43  ITK_DISALLOW_COPY_AND_MOVE(QuadraticEdgeCell);
44 
47  itkCellInheritedTypedefs(TCellInterface);
51  itkOverrideGetNameOfClassMacro(QuadraticEdgeCell);
52 
55  using VertexAutoPointer = typename VertexType::SelfAutoPointer;
56 
58  static constexpr unsigned int NumberOfPoints = 3;
59  static constexpr unsigned int NumberOfVertices = 2;
60  static constexpr unsigned int CellDimension = 1;
61 
64  GetType() const override
65  {
67  }
68  void
69  MakeCopy(CellAutoPointer &) const override;
72  unsigned int
73  GetDimension() const override;
74 
75  unsigned int
76  GetNumberOfPoints() const override;
77 
78  CellFeatureCount
79  GetNumberOfBoundaryFeatures(int dimension) const override;
80 
81  bool
82  GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override;
83  void
84  SetPointIds(PointIdConstIterator first) override;
85 
86  void
87  SetPointIds(PointIdConstIterator first, PointIdConstIterator last) override;
88 
89  void
90  SetPointId(int localId, PointIdentifier) override;
91  PointIdIterator
92  PointIdsBegin() override;
93 
94  PointIdConstIterator
95  PointIdsBegin() const override;
96 
97  PointIdIterator
98  PointIdsEnd() override;
99 
100  PointIdConstIterator
101  PointIdsEnd() const override;
102 
104  virtual CellFeatureCount
105  GetNumberOfVertices() const;
106 
107  virtual bool
108  GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
109 
112 
113  QuadraticEdgeCell() = default;
114 
115  ~QuadraticEdgeCell() override = default;
116 
119  void
120  EvaluateShapeFunctions(const ParametricCoordArrayType & parametricCoordinates,
121  ShapeFunctionsArrayType & weights) const override;
122 
123 protected:
125  std::array<PointIdentifier, NumberOfPoints> m_PointIds{ MakeFilled<std::array<PointIdentifier, NumberOfPoints>>(
127 };
128 } // end namespace itk
129 
130 #ifndef ITK_MANUAL_INSTANTIATION
131 # include "itkQuadraticEdgeCell.hxx"
132 #endif
133 
134 #endif
itk::VertexCell
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:42
itk::QuadraticEdgeCell::VertexAutoPointer
typename VertexType::SelfAutoPointer VertexAutoPointer
Definition: itkQuadraticEdgeCell.h:55
itkCellVisitMacro
#define itkCellVisitMacro(TopologyId)
Definition: itkCellInterface.h:32
itk::QuadraticEdgeCell::GetType
CellGeometryEnum GetType() const override
Definition: itkQuadraticEdgeCell.h:64
itk::QuadraticEdgeCell
Represents a second order line segment for a Mesh.
Definition: itkQuadraticEdgeCell.h:40
itk::CommonEnums::CellGeometry::QUADRATIC_EDGE_CELL
itkCellInheritedTypedefs
#define itkCellInheritedTypedefs(superclassArg)
Definition: itkCellInterface.h:55
itkMakeFilled.h
itk::CommonEnums::CellGeometry
CellGeometry
Definition: itkCommonEnums.h:138
itk::NumericTraits::max
static constexpr T max(const T &)
Definition: itkNumericTraits.h:168
itkVertexCell.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkCellCommonTypedefs
#define itkCellCommonTypedefs(celltype)
Definition: itkCellInterface.h:46