ITK  5.2.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  * http://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 
24 namespace itk
25 {
38 template <typename TCellInterface>
39 class ITK_TEMPLATE_EXPORT VertexCell : public TCellInterface
40 {
41 public:
42  ITK_DISALLOW_COPY_AND_MOVE(VertexCell);
43 
46  itkCellInheritedTypedefs(TCellInterface);
48 
50  itkTypeMacro(VertexCell, CellInterface);
51 
53  static constexpr unsigned int NumberOfPoints = 1;
54  static constexpr unsigned int CellDimension = 0;
55 
58  GetType() const override
59  {
61  }
62  void
63  MakeCopy(CellAutoPointer &) const override;
65 
66  unsigned int
67  GetDimension() const override;
68 
69  unsigned int
70  GetNumberOfPoints() const override;
71 
72  CellFeatureCount
73  GetNumberOfBoundaryFeatures(int dimension) const override;
74 
75  bool
76  GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override;
77  void
78  SetPointIds(PointIdConstIterator first) override;
79 
80  void
81  SetPointIds(PointIdConstIterator first, PointIdConstIterator last) override;
82 
83  void
84  SetPointId(int localId, PointIdentifier) override;
85  PointIdIterator
86  PointIdsBegin() override;
87 
88  PointIdConstIterator
89  PointIdsBegin() const override;
90 
91  PointIdIterator
92  PointIdsEnd() override;
93 
94  PointIdConstIterator
95  PointIdsEnd() const override;
96 
98  virtual void SetPointId(PointIdentifier);
99  virtual PointIdentifier
100  GetPointId();
102 
105 
107  bool
108  EvaluatePosition(CoordRepType *,
109  PointsContainer *,
110  CoordRepType *,
111  CoordRepType[],
112  double *,
113  InterpolationWeightType *) override;
114 
115 public:
117  {
118  for (PointIdentifier i = 0; i < Self::NumberOfPoints; i++)
119  {
120  m_PointIds[i] = NumericTraits<PointIdentifier>::max();
121  }
122  }
123 
124  ~VertexCell() override = default;
125 
126 protected:
130  PointIdentifier m_PointIds[NumberOfPoints];
131 };
132 } // end namespace itk
133 
134 #ifndef ITK_MANUAL_INSTANTIATION
135 # include "itkVertexCell.hxx"
136 #endif
137 
138 #endif
itk::VertexCell
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:39
itk::CommonEnums::CellGeometry::VERTEX_CELL
itk::VertexCell::VertexCell
VertexCell()
Definition: itkVertexCell.h:116
itkCellVisitMacro
#define itkCellVisitMacro(TopologyId)
Definition: itkCellInterface.h:32
itkCellInheritedTypedefs
#define itkCellInheritedTypedefs(superclassArg)
Definition: itkCellInterface.h:55
itk::CommonEnums::CellGeometry
CellGeometry
Definition: itkCommonEnums.h:138
itk::NumericTraits::max
static constexpr T max(const T &)
Definition: itkNumericTraits.h:167
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:58
itkNumericTraits.h
itkCellInterface.h
itkCellCommonTypedefs
#define itkCellCommonTypedefs(celltype)
Definition: itkCellInterface.h:46