18 #ifndef itkQuadEdgeMeshPolygonCell_h
19 #define itkQuadEdgeMeshPolygonCell_h
37 template<
typename 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) ITK_OVERRIDE;
124 return ( Superclass::POLYGON_CELL );
129 return ( Self::CellDimension );
132 virtual unsigned int GetNumberOfPoints() const ITK_OVERRIDE;
134 virtual CellFeatureCount GetNumberOfBoundaryFeatures(
int dimension) const ITK_OVERRIDE;
136 virtual
bool GetBoundaryFeature(
int dimension,
137 CellFeatureIdentifier cellId,
138 CellAutoPointer & cell) ITK_OVERRIDE;
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) ITK_OVERRIDE;
167 virtual void SetPointIds(PointIdConstIterator first,
168 PointIdConstIterator last) ITK_OVERRIDE;
170 virtual void SetPointId(
int localId, PointIdentifier pId) ITK_OVERRIDE;
172 virtual PointIdentifier GetPointId(
int localId)
const;
178 if ( m_PointIds.size() == 0 )
180 return ( static_cast< PointIdIterator >( ITK_NULLPTR ) );
184 return &*( m_PointIds.begin() );
191 if ( m_PointIds.size() == 0 )
193 return ( static_cast< PointIdIterator >( ITK_NULLPTR ) );
197 return &m_PointIds[m_PointIds.size() - 1] + 1;
205 if ( m_PointIds.size() == 0 )
207 return ( static_cast< PointIdIterator >( ITK_NULLPTR ) );
211 return &*( m_PointIds.begin() );
218 if ( m_PointIds.size() == 0 )
220 return ( static_cast< PointIdIterator >( ITK_NULLPTR ) );
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 &);
261 m_PointIds.push_back( it.Value()->GetOrigin() );
283 #ifndef ITK_MANUAL_INSTANTIATION
284 #include "itkQuadEdgeMeshPolygonCell.hxx"
static int GetTopologyId()
Superclass::CellTraits CellTraits
Superclass::PointType PointType
CellTraits::QuadEdgeType QuadEdgeType
QuadEdgeType::OriginRefType VertexRefType
virtual PointIdConstIterator PointIdsBegin() const override
CellTraits::PointIdInternalIterator PointIdInternalIterator
CellType::MultiVisitor MultiVisitor
QuadEdgeMeshLineCell< CellType > EdgeCellType
Superclass::PointsContainer PointsContainer
AutoPointer< Self > SelfAutoPointer
std::vector< EdgeCellType * > EdgeCellListType
virtual PointIdIterator PointIdsBegin() override
QuadEdgeType::DualType QEDual
TCellInterface Superclass
Superclass::CellConstAutoPointer CellConstAutoPointer
void MakePointIds() const
virtual void SetPointId(int localId, PointIdentifier pId) override
QuadEdgeType * GetEdgeRingEntry() const
virtual CellGeometry GetType() const override
void SetEdgeRingEntry(QuadEdgeType *entry)
Superclass::CellFeatureIdentifier CellFeatureCount
Superclass::ParametricCoordArrayType ParametricCoordArrayType
QuadEdgeType::PrimalDataType PrimalDataType
Superclass::CellConstRawPointer CellConstRawPointer
Superclass::CellIdentifier CellIdentifier
Superclass::PointIdentifier PointIdentifier
CellTraits::PointIdInternalConstIterator PointIdInternalConstIterator
AutoPointer< const Self > ConstSelfAutoPointer
Superclass::CoordRepType CoordRepType
Superclass::CellFeatureIdentifier CellFeatureIdentifier
QuadEdgeMeshPolygonCell Self
const Self * ConstRawPointer
std::vector< PointIdentifier > PointIDListType
ImageBaseType::PointType PointType
Superclass::CellRawPointer CellRawPointer
CellIdentifier GetIdent()
Superclass::UsingCellsContainer UsingCellsContainer
Superclass::CellType CellType
QuadEdgeType::DualOriginRefType FaceRefType
virtual unsigned int GetDimension() const override
Superclass::InterpolationWeightType InterpolationWeightType
CellTraits::PointIdIterator PointIdIterator
EdgeCellListType m_EdgeCellList
CellTraits::PointIdConstIterator PointIdConstIterator
Implements an Automatic Pointer to an object.
QuadEdgeType * m_EdgeRingEntry
QuadEdgeType::DualDataType DualDataType
Superclass::PixelType PixelType
PointIDListType m_PointIds
Superclass::CellAutoPointer CellAutoPointer
Superclass::ShapeFunctionsArrayType ShapeFunctionsArrayType
static ITK_CONSTEXPR_VAR double e
The base of the natural logarithm or Euler's number
virtual PointIdConstIterator PointIdsEnd() const override
virtual PointIdIterator PointIdsEnd() override
Superclass::CellGeometry CellGeometry
Class that connects the QuadEdgeMesh with the Mesh.