18 #ifndef itkQuadEdgeMeshPolygonCell_h
19 #define itkQuadEdgeMeshPolygonCell_h
38 template <
typename TCellInterface>
54 using typename Superclass::PixelType;
55 using CellType =
typename Superclass::CellType;
56 using typename Superclass::CellAutoPointer;
57 using typename Superclass::CellConstAutoPointer;
58 using typename Superclass::CellRawPointer;
59 using typename Superclass::CellConstRawPointer;
61 using typename Superclass::CoordRepType;
62 using typename Superclass::InterpolationWeightType;
63 using typename Superclass::PointIdentifier;
64 using typename Superclass::CellIdentifier;
65 using typename Superclass::CellFeatureIdentifier;
68 using typename Superclass::PointsContainer;
69 using typename Superclass::UsingCellsContainer;
70 using typename Superclass::ParametricCoordArrayType;
71 using typename Superclass::ShapeFunctionsArrayType;
72 static constexpr
unsigned int PointDimension = Superclass::PointDimension;
73 static constexpr
unsigned int CellDimension = 2;
93 using QEDual =
typename QuadEdgeType::DualType;
122 return (m_EdgeRingEntry);
127 m_EdgeRingEntry = entry;
137 Accept(CellIdentifier cellId, MultiVisitor * mv)
override;
155 return (Self::CellDimension);
159 GetNumberOfPoints()
const override;
162 GetNumberOfBoundaryFeatures(
int dimension)
const override;
165 GetBoundaryFeature(
int dimension, CellFeatureIdentifier cellId, CellAutoPointer & cell)
override;
171 const PointIdentifier numberOfPoints = this->GetNumberOfPoints();
172 auto * newPolygonCell =
new Self(numberOfPoints);
175 cell.TakeOwnership(newPolygonCell);
178 PointIdentifier i = 0;
185 newPolygonCell->SetPointId(i, it.Value()->GetOrigin());
194 SetPointIds(PointIdConstIterator first)
override;
197 SetPointIds(PointIdConstIterator first, PointIdConstIterator last)
override;
200 SetPointId(
int localId, PointIdentifier pId)
override;
202 virtual PointIdentifier
203 GetPointId(
int localId)
const;
210 if (m_PointIds.empty())
212 return (static_cast<PointIdIterator>(
nullptr));
216 return &m_PointIds.front();
224 if (m_PointIds.empty())
226 return (static_cast<PointIdIterator>(
nullptr));
230 return &m_PointIds.back() + 1;
239 if (m_PointIds.empty())
241 return (static_cast<PointIdIterator>(
nullptr));
245 return &m_PointIds.front();
253 if (m_PointIds.empty())
255 return (static_cast<PointIdIterator>(
nullptr));
259 return &m_PointIds.back() + 1;
265 InternalSetPointIds(PointIdInternalConstIterator first);
268 InternalSetPointIds(PointIdInternalConstIterator first, PointIdInternalConstIterator last);
270 virtual PointIdInternalIterator
271 InternalPointIdsBegin();
273 virtual PointIdInternalIterator
274 InternalPointIdsEnd();
276 virtual PointIdInternalConstIterator
277 InternalGetPointIds()
const;
279 virtual PointIdInternalConstIterator
280 InternalPointIdsBegin()
const;
282 virtual PointIdInternalConstIterator
283 InternalPointIdsEnd()
const;
300 m_PointIds.push_back(it.Value()->GetOrigin());
308 CellIdentifier m_Ident{};
322 #ifndef ITK_MANUAL_INSTANTIATION
323 # include "itkQuadEdgeMeshPolygonCell.hxx"