18 #ifndef itkVoronoiDiagram2DGenerator_h
19 #define itkVoronoiDiagram2DGenerator_h
49 template <
typename TCoordinate>
76 #ifndef ITK_FUTURE_LEGACY_REMOVE
77 using CoordRepType ITK_FUTURE_DEPRECATED(
78 "ITK 6 discourages using `CoordRepType`. Please use `CoordinateType` instead!") =
CoordinateType;
83 itkGetConstMacro(NumberOfSeeds,
unsigned int);
120 SetRandomSeeds(
int num);
130 PrintSelf(std::ostream & os,
Indent indent)
const override;
134 GenerateData()
override;
137 unsigned int m_NumberOfSeeds{ 0 };
181 float m_A{ 0.0 }, m_B{ 0.0 }, m_C{ 0.0 };
186 FortuneEdge() { m_Ep[0] = m_Ep[1] = m_Reg[0] = m_Reg[1] =
nullptr; }
197 bool m_RorL{
false };
199 double m_Ystar{ 0.0 };
211 : m_Left(edge.m_Left)
212 , m_Right(edge.m_Right)
213 , m_Edge(edge.m_Edge)
214 , m_RorL(edge.m_RorL)
215 , m_Vert(edge.m_Vert)
216 , m_Ystar(edge.m_Ystar)
217 , m_Next(edge.m_Next)
223 double m_Pxmin{ 0.0 };
224 double m_Pxmax{ 0.0 };
225 double m_Pymin{ 0.0 };
226 double m_Pymax{ 0.0 };
227 double m_Deltax{ 0.0 };
228 double m_Deltay{ 0.0 };
229 double m_SqrtNSites{ 0.0 };
231 unsigned int m_PQcount{ 0 };
233 unsigned int m_PQhashsize{ 0 };
234 unsigned int m_Nedges{ 0 };
235 unsigned int m_Nvert{ 0 };
237 std::vector<FortuneHalfEdge> m_PQHash{};
239 unsigned int m_ELhashsize{ 0 };
242 std::vector<FortuneHalfEdge *> m_ELHash{};
245 std::vector<FortuneSite> m_SeedSites{};
254 almostsame(CoordinateType p1, CoordinateType p2);
257 Pointonbnd(
int VertID);
266 createHalfEdge(FortuneHalfEdge * task, FortuneEdge *
e,
bool pm);
282 right_of(FortuneHalfEdge * el,
PointType * p);
285 getRightReg(FortuneHalfEdge * he);
288 getLeftReg(FortuneHalfEdge * he);
291 bisect(FortuneEdge *, FortuneSite * s1, FortuneSite * s2);
294 insertEdgeList(FortuneHalfEdge * lbase, FortuneHalfEdge * lnew);
297 intersect(FortuneSite * newV, FortuneHalfEdge * el1, FortuneHalfEdge * el2);
300 deletePQ(FortuneHalfEdge * task);
303 deleteEdgeList(FortuneHalfEdge * task);
306 PQbucket(FortuneHalfEdge * task);
309 clip_line(FortuneEdge * task);
312 insertPQ(FortuneHalfEdge * he, FortuneSite * v,
double offset);
315 dist(FortuneSite * s1, FortuneSite * s2);
321 makeEndPoint(FortuneEdge * task,
bool lr, FortuneSite * ends);
325 #ifndef ITK_MANUAL_INSTANTIATION
326 # include "itkVoronoiDiagram2DGenerator.hxx"