ITK  4.3.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_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
57  { return Superclass::VERTEX_CELL; }
58  virtual void MakeCopy(CellAutoPointer &) const;
60 
61  virtual unsigned int GetDimension(void) const;
62 
63  virtual unsigned int GetNumberOfPoints(void) const;
64 
65  virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const;
66 
67  virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier,
68  CellAutoPointer &);
69  virtual void SetPointIds(PointIdConstIterator first);
70 
71  virtual void SetPointIds(PointIdConstIterator first,
72  PointIdConstIterator last);
73 
74  virtual void SetPointId(int localId, PointIdentifier);
75  virtual PointIdIterator PointIdsBegin(void);
76 
77  virtual PointIdConstIterator PointIdsBegin(void) const;
78 
79  virtual PointIdIterator PointIdsEnd(void);
80 
81  virtual PointIdConstIterator PointIdsEnd(void) const;
82 
84  virtual void SetPointId(PointIdentifier);
85  virtual PointIdentifier GetPointId(void);
87 
89  itkCellVisitMacro(Superclass::VERTEX_CELL);
90 
92  virtual bool EvaluatePosition(CoordRepType *,
93  PointsContainer *,
94  CoordRepType *,
95  CoordRepType[],
96  double *,
97  InterpolationWeightType *);
98 
99 public:
101  {
102  for ( PointIdentifier i = 0; i < itkGetStaticConstMacro(NumberOfPoints); i++ )
103  {
104  m_PointIds[i] = NumericTraits< PointIdentifier >::max();
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
127