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
27namespace itk
28{
41template <typename TCellInterface>
42class ITK_TEMPLATE_EXPORT VertexCell : public TCellInterface
43{
44public:
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
128
131
133 bool
134 EvaluatePosition(CoordRepType *,
135 PointsContainer *,
136 CoordRepType *,
137 CoordRepType[],
138 double *,
139 InterpolationWeightType *) override;
140
141public:
142 VertexCell() = default;
143
144 ~VertexCell() override = default;
145
146protected:
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
static constexpr T max(const T &)
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:43
void SetPointIds(PointIdConstIterator first, PointIdConstIterator last) override
~VertexCell() override=default
unsigned int GetDimension() const override
bool EvaluatePosition(CoordRepType *, PointsContainer *, CoordRepType *, CoordRepType[], double *, InterpolationWeightType *) override
PointIdIterator PointIdsBegin() override
VertexCell()=default
PointIdConstIterator PointIdsEnd() const override
CellGeometryEnum GetType() const override
Definition: itkVertexCell.h:63
void SetPointIds(PointIdConstIterator first) override
PointIdConstIterator PointIdsBegin() const override
void SetPointId(int localId, PointIdentifier) override
bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override
unsigned int GetNumberOfPoints() const override
virtual PointIdentifier GetPointId()
itkCellVisitMacro(CellGeometryEnum::VERTEX_CELL)
itkCellInheritedTypedefs(TCellInterface)
CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override
PointIdIterator PointIdsEnd() override
virtual void SetPointId(PointIdentifier)
itkCellCommonTypedefs(VertexCell)
void MakeCopy(CellAutoPointer &) const override
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....