ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkLineCell.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 __itkLineCell_h
19 #define __itkLineCell_h
20 
21 #include "itkVertexCell.h"
22 
23 namespace itk
24 {
41 template< typename TCellInterface >
42 class LineCell:public TCellInterface
43 {
44 public:
47  itkCellInheritedTypedefs(TCellInterface);
49 
51  itkTypeMacro(LineCell, CellInterface);
52 
55  typedef typename VertexType::SelfAutoPointer VertexAutoPointer;
56 
58  enum { NumberOfPoints = 2,
61 
63  virtual CellGeometry GetType(void) const
64  { return Superclass::LINE_CELL; }
65  virtual void MakeCopy(CellAutoPointer &) const;
67 
68  virtual unsigned int GetDimension(void) const;
69 
70  virtual unsigned int GetNumberOfPoints(void) const;
71 
72  virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const;
73 
74  virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &);
75  virtual void SetPointIds(PointIdConstIterator first);
76 
77  virtual void SetPointIds(PointIdConstIterator first,
78  PointIdConstIterator last);
79 
80  virtual void SetPointId(int localId, PointIdentifier);
81  virtual PointIdIterator PointIdsBegin(void);
82 
83  virtual PointIdConstIterator PointIdsBegin(void) const;
84 
85  virtual PointIdIterator PointIdsEnd(void);
86 
87  virtual PointIdConstIterator PointIdsEnd(void) const;
88 
90  virtual CellFeatureCount GetNumberOfVertices(void) const;
91 
92  virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
93 
95  itkCellVisitMacro(Superclass::LINE_CELL);
96 
98  {
99  for ( unsigned int i = 0; i < itkGetStaticConstMacro(NumberOfPoints); i++ )
100  {
102  }
103  }
104 
106 
107 protected:
109  PointIdentifier m_PointIds[NumberOfPoints];
110 
111 private:
112  LineCell(const Self &); //purposely not implemented
113  void operator=(const Self &); //purposely not implemented
114 };
115 } // end namespace itk
116 
117 #ifndef ITK_MANUAL_INSTANTIATION
118 #include "itkLineCell.hxx"
119 #endif
120 
121 #endif
void operator=(const Self &)
Represents a line segment for a Mesh.
Definition: itkLineCell.h:42
virtual void MakeCopy(CellAutoPointer &) const
virtual PointIdIterator PointIdsBegin(void)
VertexCell< TCellInterface > VertexType
Definition: itkLineCell.h:51
virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const
VertexType::SelfAutoPointer VertexAutoPointer
Definition: itkLineCell.h:55
itkCellVisitMacro(Superclass::LINE_CELL)
An abstract interface for cells.
virtual void SetPointId(int localId, PointIdentifier)
virtual void SetPointIds(PointIdConstIterator first)
PointIdentifier m_PointIds[NumberOfPoints]
Definition: itkLineCell.h:109
virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &)
static T max(const T &)
virtual PointIdIterator PointIdsEnd(void)
virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &)
virtual CellFeatureCount GetNumberOfVertices(void) const
Represents a single vertex for a Mesh.
Definition: itkVertexCell.h:39
virtual CellGeometry GetType(void) const
Definition: itkLineCell.h:63
virtual unsigned int GetNumberOfPoints(void) const
itkCellInheritedTypedefs(TCellInterface)
itkCellCommonTypedefs(LineCell)
virtual unsigned int GetDimension(void) const