ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkVertexCell.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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:
44  itkCellInheritedTypedefs(TCellInterface);
46 
48  itkTypeMacro(VertexCell, CellInterface);
49 
51  itkStaticConstMacro(NumberOfPoints, unsigned int, 1);
52  itkStaticConstMacro(CellDimension, unsigned int, 0);
54 
56  virtual CellGeometry GetType(void) const ITK_OVERRIDE
57  { return Superclass::VERTEX_CELL; }
58  virtual void MakeCopy(CellAutoPointer &) const ITK_OVERRIDE;
60 
61  virtual unsigned int GetDimension(void) const ITK_OVERRIDE;
62 
63  virtual unsigned int GetNumberOfPoints(void) const ITK_OVERRIDE;
64 
65  virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const ITK_OVERRIDE;
66 
67  virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier,
68  CellAutoPointer &) ITK_OVERRIDE;
69  virtual void SetPointIds(PointIdConstIterator first) ITK_OVERRIDE;
70 
71  virtual void SetPointIds(PointIdConstIterator first,
72  PointIdConstIterator last) ITK_OVERRIDE;
73 
74  virtual void SetPointId(int localId, PointIdentifier) ITK_OVERRIDE;
75  virtual PointIdIterator PointIdsBegin(void) ITK_OVERRIDE;
76 
77  virtual PointIdConstIterator PointIdsBegin(void) const ITK_OVERRIDE;
78 
79  virtual PointIdIterator PointIdsEnd(void) ITK_OVERRIDE;
80 
81  virtual PointIdConstIterator PointIdsEnd(void) const ITK_OVERRIDE;
82 
84  virtual void SetPointId(PointIdentifier);
85  virtual PointIdentifier GetPointId();
87 
89  itkCellVisitMacro(Superclass::VERTEX_CELL);
90 
92  virtual bool EvaluatePosition(CoordRepType *,
93  PointsContainer *,
94  CoordRepType *,
95  CoordRepType[],
96  double *,
97  InterpolationWeightType *) ITK_OVERRIDE;
98 
99 public:
101  {
102  for ( PointIdentifier i = 0; i < itkGetStaticConstMacro(NumberOfPoints); i++ )
103  {
104  m_PointIds[i] = NumericTraits< PointIdentifier >::max();
105  }
106  }
107 
108  ~VertexCell() ITK_OVERRIDE {}
109 
110 protected:
114  PointIdentifier m_PointIds[NumberOfPoints];
115 
116 private:
117  ITK_DISALLOW_COPY_AND_ASSIGN(VertexCell);
118 };
119 } // end namespace itk
120 
121 #ifndef ITK_MANUAL_INSTANTIATION
122 #include "itkVertexCell.hxx"
123 #endif
124 
125 #endif
An abstract interface for cells.
static ITK_CONSTEXPR_FUNC T max(const T &)
#define itkCellCommonTypedefs(celltype)
~VertexCell() override
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:39
#define itkCellVisitMacro(TopologyId)
#define itkCellInheritedTypedefs(superclassArg)
virtual CellGeometry GetType(void) const override
Definition: itkVertexCell.h:56