ITK  6.0.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 {
36 template <typename TCellInterface>
37 class ITK_TEMPLATE_EXPORT VertexCell : public TCellInterface
38 {
39 public:
40  ITK_DISALLOW_COPY_AND_MOVE(VertexCell);
41 
44  itkCellInheritedTypedefs(TCellInterface);
48  itkOverrideGetNameOfClassMacro(VertexCell);
49 
51  static constexpr unsigned int NumberOfPoints = 1;
52  static constexpr unsigned int CellDimension = 0;
53 
54  // Standard CellInterface
55 
58  GetType() const override
59  {
61  }
62  void
63  MakeCopy(CellAutoPointer &) const override;
67  unsigned int
68  GetDimension() const override;
69 
71  unsigned int
72  GetNumberOfPoints() const override;
73 
75  CellFeatureCount
76  GetNumberOfBoundaryFeatures(int dimension) const override;
77 
79  bool
80  GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override;
81 
85  void
86  SetPointIds(PointIdConstIterator first) override;
87 
92  void
93  SetPointIds(PointIdConstIterator first, PointIdConstIterator last) override;
94 
95  // Vertex-specific interface
96 
98  void
99  SetPointId(int localId, PointIdentifier) override;
100 
102  PointIdIterator
103  PointIdsBegin() override;
104 
106  PointIdConstIterator
107  PointIdsBegin() const override;
108 
110  PointIdIterator
111  PointIdsEnd() override;
112 
114  PointIdConstIterator
115  PointIdsEnd() const override;
116 
118  virtual void SetPointId(PointIdentifier);
119 
121  virtual PointIdentifier
122  GetPointId();
123 
126 
128  bool
129  EvaluatePosition(CoordinateType *,
130  PointsContainer *,
131  CoordinateType *,
132  CoordinateType[],
133  double *,
134  InterpolationWeightType *) override;
135 
136 public:
137  VertexCell() = default;
138 
139  ~VertexCell() override = default;
140 
141 protected:
145  std::array<PointIdentifier, NumberOfPoints> m_PointIds{ MakeFilled<std::array<PointIdentifier, NumberOfPoints>>(
147 };
148 } // end namespace itk
149 
150 #ifndef ITK_MANUAL_INSTANTIATION
151 # include "itkVertexCell.hxx"
152 #endif
153 
154 #endif
itk::VertexCell
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:37
itkCellVisitMacro
#define itkCellVisitMacro(TopologyId)
Definition: itkCellInterface.h:32
itk::CommonEnums::CellGeometry
CellGeometry
Definition: itkCommonEnums.h:132
itkCellInheritedTypedefs
#define itkCellInheritedTypedefs(superclassArg)
Definition: itkCellInterface.h:56
itkMakeFilled.h
itk::NumericTraits::max
static constexpr T max(const T &)
Definition: itkNumericTraits.h:169
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::VertexCell::GetType
CellGeometryEnum GetType() const override
Definition: itkVertexCell.h:58
itkNumericTraits.h
itkCellInterface.h
itk::CommonEnums::CellGeometry::VERTEX_CELL
itkCellCommonTypedefs
#define itkCellCommonTypedefs(celltype)
Definition: itkCellInterface.h:47