ITK  4.8.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 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  {
105  }
106  }
107 
109 
110 protected:
114  PointIdentifier m_PointIds[NumberOfPoints];
115 
116 private:
117  VertexCell(const Self &); //purposely not implemented
118  void operator=(const Self &); //purposely not implemented
119 };
120 } // end namespace itk
121 
122 #ifndef ITK_MANUAL_INSTANTIATION
123 #include "itkVertexCell.hxx"
124 #endif
125 
126 #endif
virtual PointIdentifier GetPointId()
virtual unsigned int GetDimension(void) const override
virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &) override
virtual void SetPointId(int localId, PointIdentifier) override
virtual PointIdIterator PointIdsBegin(void) override
virtual unsigned int GetNumberOfPoints(void) const override
An abstract interface for cells.
void operator=(const Self &)
virtual void SetPointIds(PointIdConstIterator first) override
virtual PointIdIterator PointIdsEnd(void) override
virtual bool EvaluatePosition(CoordRepType *, PointsContainer *, CoordRepType *, CoordRepType[], double *, InterpolationWeightType *) override
virtual void MakeCopy(CellAutoPointer &) const override
PointIdentifier m_PointIds[NumberOfPoints]
static T max(const T &)
itkCellInheritedTypedefs(TCellInterface)
static const unsigned int NumberOfPoints
Definition: itkVertexCell.h:51
virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const override
static const unsigned int CellDimension
Definition: itkVertexCell.h:52
itkCellVisitMacro(Superclass::VERTEX_CELL)
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:39
itkCellCommonTypedefs(VertexCell)
virtual CellGeometry GetType(void) const override
Definition: itkVertexCell.h:56