18 #ifndef itkQuadEdgeMeshPolygonCell_h
19 #define itkQuadEdgeMeshPolygonCell_h
37 template<
typename TCellInterface >
54 using CellType =
typename Superclass::CellType;
72 static constexpr
unsigned int PointDimension = Superclass::PointDimension;
73 static constexpr
unsigned int CellDimension = 2;
93 using QEDual =
typename QuadEdgeType::DualType;
116 SelfAutoPointer New();
119 void Accept(CellIdentifier cellId, MultiVisitor *mv)
override;
126 return ( Superclass::POLYGON_CELL );
131 return ( Self::CellDimension );
134 unsigned int GetNumberOfPoints()
const override;
136 CellFeatureCount GetNumberOfBoundaryFeatures(
int dimension)
const override;
138 bool GetBoundaryFeature(
int dimension,
139 CellFeatureIdentifier cellId,
140 CellAutoPointer & cell)
override;
146 auto * newPolygonCell =
new Self(numberOfPoints);
149 cell.TakeOwnership(newPolygonCell);
150 if ( numberOfPoints )
159 newPolygonCell->SetPointId( i, it.Value()->GetOrigin() );
167 void SetPointIds(PointIdConstIterator first)
override;
169 void SetPointIds(PointIdConstIterator first,
170 PointIdConstIterator last)
override;
172 void SetPointId(
int localId, PointIdentifier pId)
override;
174 virtual PointIdentifier GetPointId(
int localId)
const;
180 if ( m_PointIds.empty() )
182 return ( static_cast< PointIdIterator >(
nullptr ) );
186 return &*( m_PointIds.begin() );
193 if ( m_PointIds.empty() )
195 return ( static_cast< PointIdIterator >(
nullptr ) );
199 return &m_PointIds[m_PointIds.size() - 1] + 1;
207 if ( m_PointIds.empty() )
209 return ( static_cast< PointIdIterator >(
nullptr ) );
213 return &*( m_PointIds.begin() );
220 if ( m_PointIds.empty() )
222 return ( static_cast< PointIdIterator >(
nullptr ) );
226 return &m_PointIds[m_PointIds.size() - 1] + 1;
231 virtual void InternalSetPointIds(PointIdInternalConstIterator first);
233 virtual void InternalSetPointIds(PointIdInternalConstIterator first,
234 PointIdInternalConstIterator last);
236 virtual PointIdInternalIterator InternalPointIdsBegin();
238 virtual PointIdInternalIterator InternalPointIdsEnd();
240 virtual PointIdInternalConstIterator InternalGetPointIds()
const;
242 virtual PointIdInternalConstIterator InternalPointIdsBegin()
const;
244 virtual PointIdInternalConstIterator InternalPointIdsEnd()
const;
260 m_PointIds.push_back( it.Value()->GetOrigin() );
282 #ifndef ITK_MANUAL_INSTANTIATION
283 #include "itkQuadEdgeMeshPolygonCell.hxx"
static int GetTopologyId()
typename CellTraits::PointIdConstIterator PointIdConstIterator
typename Superclass::CellIdentifier CellIdentifier
typename Superclass::CoordRepType CoordRepType
typename Superclass::InterpolationWeightType InterpolationWeightType
TCellInterface Superclass
PointIdIterator PointIdsEnd() override
typename CellTraits::QuadEdgeType QuadEdgeType
typename Superclass::CellRawPointer CellRawPointer
typename Superclass::CellConstAutoPointer CellConstAutoPointer
typename QuadEdgeType::DualOriginRefType FaceRefType
typename Superclass::ShapeFunctionsArrayType ShapeFunctionsArrayType
typename CellTraits::PointIdInternalIterator PointIdInternalIterator
void MakePointIds() const
QuadEdgeType * GetEdgeRingEntry() const
typename QuadEdgeType::DualDataType DualDataType
typename Superclass::CellGeometry CellGeometry
typename Superclass::UsingCellsContainer UsingCellsContainer
void MakeCopy(CellAutoPointer &cell) const override
void SetEdgeRingEntry(QuadEdgeType *entry)
unsigned int GetDimension() const override
typename Superclass::CellFeatureIdentifier CellFeatureCount
typename Superclass::ParametricCoordArrayType ParametricCoordArrayType
typename CellTraits::PointIdInternalConstIterator PointIdInternalConstIterator
typename Superclass::CellType CellType
PointIdConstIterator PointIdsBegin() const override
typename QuadEdgeType::PrimalDataType PrimalDataType
CellGeometry GetType() const override
typename Superclass::PointsContainer PointsContainer
CellIdentifier GetIdent()
typename CellType::MultiVisitor MultiVisitor
typename Superclass::CellAutoPointer CellAutoPointer
std::vector< PointIdentifier > PointIDListType
typename CellTraits::PointIdIterator PointIdIterator
typename QuadEdgeType::DualType QEDual
void SetIdent(CellIdentifier cid)
typename Superclass::PointType PointType
EdgeCellListType m_EdgeCellList
typename Superclass::PixelType PixelType
Implements an Automatic Pointer to an object.
static constexpr double e
The base of the natural logarithm or Euler's number
PointIdConstIterator PointIdsEnd() const override
typename Superclass::CellFeatureIdentifier CellFeatureIdentifier
ImageBaseType::PointType PointType
QuadEdgeType * m_EdgeRingEntry
typename Superclass::PointIdentifier PointIdentifier
PointIDListType m_PointIds
std::vector< EdgeCellType * > EdgeCellListType
typename QuadEdgeType::OriginRefType VertexRefType
typename Superclass::CellTraits CellTraits
Class that connects the QuadEdgeMesh with the Mesh.
typename Superclass::CellConstRawPointer CellConstRawPointer
PointIdIterator PointIdsBegin() override