ITK  5.2.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  * 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 itkQuadraticEdgeCell_h
19 #define itkQuadraticEdgeCell_h
20 
21 #include "itkVertexCell.h"
22 
23 namespace itk
24 {
36 template <typename TCellInterface>
37 class ITK_TEMPLATE_EXPORT QuadraticEdgeCell : public TCellInterface
38 {
39 public:
40  ITK_DISALLOW_COPY_AND_MOVE(QuadraticEdgeCell);
41 
44  itkCellInheritedTypedefs(TCellInterface);
46 
48  itkTypeMacro(QuadraticEdgeCell, CellInterface);
49 
52  using VertexAutoPointer = typename VertexType::SelfAutoPointer;
53 
55  static constexpr unsigned int NumberOfPoints = 3;
56  static constexpr unsigned int NumberOfVertices = 2;
57  static constexpr unsigned int CellDimension = 1;
58 
61  GetType() const override
62  {
64  }
65  void
66  MakeCopy(CellAutoPointer &) const override;
68 
69  unsigned int
70  GetDimension() const override;
71 
72  unsigned int
73  GetNumberOfPoints() const override;
74 
75  CellFeatureCount
76  GetNumberOfBoundaryFeatures(int dimension) const override;
77 
78  bool
79  GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override;
80  void
81  SetPointIds(PointIdConstIterator first) override;
82 
83  void
84  SetPointIds(PointIdConstIterator first, PointIdConstIterator last) override;
85 
86  void
87  SetPointId(int localId, PointIdentifier) override;
88  PointIdIterator
89  PointIdsBegin() override;
90 
91  PointIdConstIterator
92  PointIdsBegin() const override;
93 
94  PointIdIterator
95  PointIdsEnd() override;
96 
97  PointIdConstIterator
98  PointIdsEnd() const override;
99 
101  virtual CellFeatureCount
102  GetNumberOfVertices() const;
103 
104  virtual bool
105  GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
106 
109 
111  {
112  for (PointIdentifier i = 0; i < Self::NumberOfPoints; i++)
113  {
114  m_PointIds[i] = NumericTraits<PointIdentifier>::max();
115  }
116  }
117 
118  ~QuadraticEdgeCell() override = default;
119 
122  void
123  EvaluateShapeFunctions(const ParametricCoordArrayType & parametricCoordinates,
124  ShapeFunctionsArrayType & weights) const override;
125 
126 protected:
128  PointIdentifier m_PointIds[NumberOfPoints];
129 };
130 } // end namespace itk
131 
132 #ifndef ITK_MANUAL_INSTANTIATION
133 # include "itkQuadraticEdgeCell.hxx"
134 #endif
135 
136 #endif
itk::VertexCell
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:39
itk::QuadraticEdgeCell::VertexAutoPointer
typename VertexType::SelfAutoPointer VertexAutoPointer
Definition: itkQuadraticEdgeCell.h:52
itkCellVisitMacro
#define itkCellVisitMacro(TopologyId)
Definition: itkCellInterface.h:32
itk::QuadraticEdgeCell::GetType
CellGeometryEnum GetType() const override
Definition: itkQuadraticEdgeCell.h:61
itk::QuadraticEdgeCell
Represents a second order line segment for a Mesh.
Definition: itkQuadraticEdgeCell.h:37
itk::CommonEnums::CellGeometry::QUADRATIC_EDGE_CELL
itkCellInheritedTypedefs
#define itkCellInheritedTypedefs(superclassArg)
Definition: itkCellInterface.h:55
itk::CommonEnums::CellGeometry
CellGeometry
Definition: itkCommonEnums.h:138
itk::NumericTraits::max
static constexpr T max(const T &)
Definition: itkNumericTraits.h:167
itkVertexCell.h
itk::QuadraticEdgeCell::QuadraticEdgeCell
QuadraticEdgeCell()
Definition: itkQuadraticEdgeCell.h:110
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
itkCellCommonTypedefs
#define itkCellCommonTypedefs(celltype)
Definition: itkCellInterface.h:46