18 #ifndef itkVoronoiDiagram2DGenerator_h
19 #define itkVoronoiDiagram2DGenerator_h
49 template <
typename TCoordType>
79 itkGetConstMacro(NumberOfSeeds,
unsigned int);
116 SetRandomSeeds(
int num);
126 PrintSelf(std::ostream & os,
Indent indent)
const override;
130 GenerateData()
override;
133 unsigned int m_NumberOfSeeds{ 0 };
177 float m_A{ 0.0 }, m_B{ 0.0 }, m_C{ 0.0 };
182 FortuneEdge() { m_Ep[0] = m_Ep[1] = m_Reg[0] = m_Reg[1] =
nullptr; }
193 bool m_RorL{
false };
195 double m_Ystar{ 0.0 };
207 : m_Left(edge.m_Left)
208 , m_Right(edge.m_Right)
209 , m_Edge(edge.m_Edge)
210 , m_RorL(edge.m_RorL)
211 , m_Vert(edge.m_Vert)
212 , m_Ystar(edge.m_Ystar)
213 , m_Next(edge.m_Next)
219 double m_Pxmin{ 0.0 };
220 double m_Pxmax{ 0.0 };
221 double m_Pymin{ 0.0 };
222 double m_Pymax{ 0.0 };
223 double m_Deltax{ 0.0 };
224 double m_Deltay{ 0.0 };
225 double m_SqrtNSites{ 0.0 };
227 unsigned int m_PQcount{ 0 };
229 unsigned int m_PQhashsize{ 0 };
230 unsigned int m_Nedges{ 0 };
231 unsigned int m_Nvert{ 0 };
233 std::vector<FortuneHalfEdge> m_PQHash{};
235 unsigned int m_ELhashsize{ 0 };
238 std::vector<FortuneHalfEdge *> m_ELHash{};
241 std::vector<FortuneSite> m_SeedSites{};
250 almostsame(CoordRepType p1, CoordRepType p2);
253 Pointonbnd(
int VertID);
262 createHalfEdge(FortuneHalfEdge * task, FortuneEdge *
e,
bool pm);
278 right_of(FortuneHalfEdge * el,
PointType * p);
281 getRightReg(FortuneHalfEdge * he);
284 getLeftReg(FortuneHalfEdge * he);
287 bisect(FortuneEdge *, FortuneSite * s1, FortuneSite * s2);
290 insertEdgeList(FortuneHalfEdge * lbase, FortuneHalfEdge * lnew);
293 intersect(FortuneSite * newV, FortuneHalfEdge * el1, FortuneHalfEdge * el2);
296 deletePQ(FortuneHalfEdge * task);
299 deleteEdgeList(FortuneHalfEdge * task);
302 PQbucket(FortuneHalfEdge * task);
305 clip_line(FortuneEdge * task);
308 insertPQ(FortuneHalfEdge * he, FortuneSite * v,
double offset);
311 dist(FortuneSite * s1, FortuneSite * s2);
317 makeEndPoint(FortuneEdge * task,
bool lr, FortuneSite * ends);
321 #ifndef ITK_MANUAL_INSTANTIATION
322 # include "itkVoronoiDiagram2DGenerator.hxx"