18 #ifndef __itkQuadEdgeMeshPolygonCell_h
19 #define __itkQuadEdgeMeshPolygonCell_h
37 template<
class TCellInterface >
52 typedef typename Superclass::CellType
CellType;
70 itkStaticConstMacro(PointDimension,
unsigned int, Superclass::PointDimension);
71 itkStaticConstMacro(CellDimension,
unsigned int, 2);
91 typedef typename QuadEdgeType::DualType
QEDual;
114 SelfAutoPointer New();
117 virtual void Accept(CellIdentifier cellId, MultiVisitor *mv);
122 static int GetTopologyId()
124 return ( Superclass::POLYGON_CELL );
129 return ( Self::CellDimension );
132 virtual unsigned int GetNumberOfPoints()
const;
134 virtual CellFeatureCount GetNumberOfBoundaryFeatures(
int dimension)
const;
136 virtual bool GetBoundaryFeature(
int dimension,
137 CellFeatureIdentifier cellId,
138 CellAutoPointer & cell);
144 Self * newPolygonCell =
new Self(numberOfPoints);
147 cell.TakeOwnership(newPolygonCell);
148 if ( numberOfPoints )
152 newPolygonCell->
SetPointId( i, this->GetPointId(i) );
158 virtual void SetPointIds(PointIdConstIterator first);
160 virtual void SetPointIds(PointIdConstIterator first,
161 PointIdConstIterator last);
163 virtual void SetPointId(
int localId, PointIdentifier pId);
165 virtual PointIdentifier GetPointId(
int localId)
const;
171 if ( m_PointIds.size() == 0 )
173 return ( static_cast< PointIdIterator >( 0 ) );
177 return &*( m_PointIds.begin() );
184 if ( m_PointIds.size() == 0 )
186 return ( static_cast< PointIdIterator >( 0 ) );
190 return &m_PointIds[m_PointIds.size() - 1] + 1;
198 if ( m_PointIds.size() == 0 )
200 return ( static_cast< PointIdIterator >( 0 ) );
204 return &*( m_PointIds.begin() );
211 if ( m_PointIds.size() == 0 )
213 return ( static_cast< PointIdIterator >( 0 ) );
217 return &m_PointIds[m_PointIds.size() - 1] + 1;
222 virtual void InternalSetPointIds(PointIdInternalConstIterator first);
224 virtual void InternalSetPointIds(PointIdInternalConstIterator first,
225 PointIdInternalConstIterator last);
227 virtual PointIdInternalIterator InternalPointIdsBegin();
229 virtual PointIdInternalIterator InternalPointIdsEnd();
231 virtual PointIdInternalConstIterator InternalGetPointIds()
const;
233 virtual PointIdInternalConstIterator InternalPointIdsBegin()
const;
235 virtual PointIdInternalConstIterator InternalPointIdsEnd()
const;
242 void operator=(
const Self &);
244 void MakePointIds()
const
246 if ( !this->GetNumberOfPoints() )
256 m_PointIds.push_back( GetPointId(i) );
277 #ifndef ITK_MANUAL_INSTANTIATION
278 #include "itkQuadEdgeMeshPolygonCell.hxx"