ITK  4.6.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
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  {
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 bool EvaluatePosition(CoordRepType *, PointsContainer *, CoordRepType *, CoordRepType[], double *, InterpolationWeightType *)
virtual void SetPointId(int localId, PointIdentifier)
virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const
virtual unsigned int GetDimension(void) const
virtual CellGeometry GetType(void) const
Definition: itkVertexCell.h:56
virtual unsigned int GetNumberOfPoints(void) const
An abstract interface for cells.
void operator=(const Self &)
PointIdentifier m_PointIds[NumberOfPoints]
static T max(const T &)
itkCellInheritedTypedefs(TCellInterface)
static const unsigned int NumberOfPoints
Definition: itkVertexCell.h:51
virtual PointIdIterator PointIdsEnd(void)
virtual PointIdIterator PointIdsBegin(void)
static const unsigned int CellDimension
Definition: itkVertexCell.h:52
virtual void SetPointIds(PointIdConstIterator first)
itkCellVisitMacro(Superclass::VERTEX_CELL)
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:39
virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &)
virtual PointIdentifier GetPointId(void)
virtual void MakeCopy(CellAutoPointer &) const
itkCellCommonTypedefs(VertexCell)