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  itkOverrideGetNameOfClassMacro(VertexCell);
54 
56  static constexpr unsigned int NumberOfPoints = 1;
57  static constexpr unsigned int CellDimension = 0;
58 
59  // Standard CellInterface
60 
63  GetType() const override
64  {
66  }
67  void
68  MakeCopy(CellAutoPointer &) const override;
72  unsigned int
73  GetDimension() const override;
74 
76  unsigned int
77  GetNumberOfPoints() const override;
78 
80  CellFeatureCount
81  GetNumberOfBoundaryFeatures(int dimension) const override;
82 
84  bool
85  GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override;
86 
90  void
91  SetPointIds(PointIdConstIterator first) override;
92 
97  void
98  SetPointIds(PointIdConstIterator first, PointIdConstIterator last) override;
99 
100  // Vertex-specific interface
101 
103  void
104  SetPointId(int localId, PointIdentifier) override;
105 
107  PointIdIterator
108  PointIdsBegin() override;
109 
111  PointIdConstIterator
112  PointIdsBegin() const override;
113 
115  PointIdIterator
116  PointIdsEnd() override;
117 
119  PointIdConstIterator
120  PointIdsEnd() const override;
121 
123  virtual void SetPointId(PointIdentifier);
124 
126  virtual PointIdentifier
127  GetPointId();
128 
131 
133  bool
134  EvaluatePosition(CoordRepType *,
135  PointsContainer *,
136  CoordRepType *,
137  CoordRepType[],
138  double *,
139  InterpolationWeightType *) override;
140 
141 public:
142  VertexCell() = default;
143 
144  ~VertexCell() override = default;
145 
146 protected:
150  std::array<PointIdentifier, NumberOfPoints> m_PointIds{ MakeFilled<std::array<PointIdentifier, NumberOfPoints>>(
152 };
153 } // end namespace itk
154 
155 #ifndef ITK_MANUAL_INSTANTIATION
156 # include "itkVertexCell.hxx"
157 #endif
158 
159 #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
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:63
itkNumericTraits.h
itkCellInterface.h
itkCellCommonTypedefs
#define itkCellCommonTypedefs(celltype)
Definition: itkCellInterface.h:46