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 );
127 virtual unsigned int GetDimension()
const
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 )
157 newPolygonCell->
SetPointId( i, it.Value()->GetOrigin() );
165 virtual void SetPointIds(PointIdConstIterator first);
167 virtual void SetPointIds(PointIdConstIterator first,
168 PointIdConstIterator last);
170 virtual void SetPointId(
int localId, PointIdentifier pId);
172 virtual PointIdentifier GetPointId(
int localId)
const;
178 if ( m_PointIds.size() == 0 )
180 return ( static_cast< PointIdIterator >( 0 ) );
184 return &*( m_PointIds.begin() );
191 if ( m_PointIds.size() == 0 )
193 return ( static_cast< PointIdIterator >( 0 ) );
197 return &m_PointIds[m_PointIds.size() - 1] + 1;
205 if ( m_PointIds.size() == 0 )
207 return ( static_cast< PointIdIterator >( 0 ) );
211 return &*( m_PointIds.begin() );
218 if ( m_PointIds.size() == 0 )
220 return ( static_cast< PointIdIterator >( 0 ) );
224 return &m_PointIds[m_PointIds.size() - 1] + 1;
229 virtual void InternalSetPointIds(PointIdInternalConstIterator first);
231 virtual void InternalSetPointIds(PointIdInternalConstIterator first,
232 PointIdInternalConstIterator last);
234 virtual PointIdInternalIterator InternalPointIdsBegin();
236 virtual PointIdInternalIterator InternalPointIdsEnd();
238 virtual PointIdInternalConstIterator InternalGetPointIds()
const;
240 virtual PointIdInternalConstIterator InternalPointIdsBegin()
const;
242 virtual PointIdInternalConstIterator InternalPointIdsEnd()
const;
250 void operator=(
const Self &);
252 void MakePointIds()
const
261 m_PointIds.push_back( it.Value()->GetOrigin() );
283 #ifndef ITK_MANUAL_INSTANTIATION
284 #include "itkQuadEdgeMeshPolygonCell.hxx"