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
27namespace itk
28{
36template <typename TCellInterface>
37class ITK_TEMPLATE_EXPORT VertexCell : public TCellInterface
38{
39public:
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
123
126
128 bool
129 EvaluatePosition(CoordRepType *,
130 PointsContainer *,
131 CoordRepType *,
132 CoordRepType[],
133 double *,
134 InterpolationWeightType *) override;
135
136public:
137 VertexCell() = default;
138
139 ~VertexCell() override = default;
140
141protected:
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
static constexpr T max(const T &)
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:38
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:58
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....