ITK  5.4.0
Insight Toolkit
itkVertexCell.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 itkVertexCell_h
19 #define itkVertexCell_h
20 
21 #include "itkCellInterface.h"
22 #include "itkNumericTraits.h"
23 #include "itkMakeFilled.h"
24 
25 #include <array>
26 
27 namespace itk
28 {
41 template <typename TCellInterface>
42 class ITK_TEMPLATE_EXPORT VertexCell : public TCellInterface
43 {
44 public:
45  ITK_DISALLOW_COPY_AND_MOVE(VertexCell);
46 
49  itkCellInheritedTypedefs(TCellInterface);
53  itkTypeMacro(VertexCell, CellInterface);
54 
56  static constexpr unsigned int NumberOfPoints = 1;
57  static constexpr unsigned int CellDimension = 0;
58 
61  GetType() const override
62  {
64  }
65  void
66  MakeCopy(CellAutoPointer &) const override;
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 void SetPointId(PointIdentifier);
102  virtual PointIdentifier
103  GetPointId();
108 
110  bool
111  EvaluatePosition(CoordRepType *,
112  PointsContainer *,
113  CoordRepType *,
114  CoordRepType[],
115  double *,
116  InterpolationWeightType *) override;
117 
118 public:
119  VertexCell() = default;
120 
121  ~VertexCell() override = default;
122 
123 protected:
127  std::array<PointIdentifier, NumberOfPoints> m_PointIds{ MakeFilled<std::array<PointIdentifier, NumberOfPoints>>(
129 };
130 } // end namespace itk
131 
132 #ifndef ITK_MANUAL_INSTANTIATION
133 # include "itkVertexCell.hxx"
134 #endif
135 
136 #endif
itk::VertexCell
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:42
itk::CommonEnums::CellGeometry::VERTEX_CELL
itkCellVisitMacro
#define itkCellVisitMacro(TopologyId)
Definition: itkCellInterface.h:32
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
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
itk::VertexCell::GetType
CellGeometryEnum GetType() const override
Definition: itkVertexCell.h:61
itkNumericTraits.h
itkCellInterface.h
itkCellCommonTypedefs
#define itkCellCommonTypedefs(celltype)
Definition: itkCellInterface.h:46