18#ifndef itkVoronoiDiagram2DGenerator_h
19#define itkVoronoiDiagram2DGenerator_h
49template <
typename TCoordType>
79 itkGetConstMacro(NumberOfSeeds,
unsigned int);
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{};
321#ifndef ITK_MANUAL_INSTANTIATION
322# include "itkVoronoiDiagram2DGenerator.hxx"
Control indentation during Print() invocation.
Light weight base class for most itk classes.
Base class for all process objects that output mesh data.
Define additional traits for native types such as int or float.
A templated class holding a geometric point in n-Dimensional space.
FortuneHalfEdge(const FortuneHalfEdge &edge)
~FortuneHalfEdge()=default
FortuneHalfEdge * m_Right
Small data structures for Fortune's Method and some public variables/methods not for external access.
Implement the Sweep Line Algorithm for the construction of the 2D Voronoi Diagram.
void SetOrigin(PointType vorsize)
void deletePQ(FortuneHalfEdge *task)
FortuneHalfEdge * findLeftHE(PointType *p)
void intersect(FortuneSite *newV, FortuneHalfEdge *el1, FortuneHalfEdge *el2)
typename VDMesh::SeedsType SeedsType
void insertPQ(FortuneHalfEdge *he, FortuneSite *v, double offset)
void GenerateOutputInformation() override
void AddOneSeed(PointType)
bool almostsame(CoordRepType p1, CoordRepType p2)
void bisect(FortuneEdge *, FortuneSite *s1, FortuneSite *s2)
PointType GetSeed(int SeedID)
void SetBoundary(PointType vorsize)
unsigned char Pointonbnd(int VertID)
void PQshowMin(PointType *answer)
FortuneHalfEdge * getPQmin()
void deleteEdgeList(FortuneHalfEdge *task)
void PrintSelf(std::ostream &os, Indent indent) const override
void createHalfEdge(FortuneHalfEdge *task, FortuneEdge *e, bool pm)
typename VDMesh::EdgeInfo EdgeInfo
bool right_of(FortuneHalfEdge *el, PointType *p)
FortuneHalfEdge * ELgethash(int b)
int PQbucket(FortuneHalfEdge *task)
void AddSeeds(int num, SeedsIterator begin)
void SetSeeds(int num, SeedsIterator begin)
static bool comp(PointType arg1, PointType arg2)
typename VDMesh::SeedsIterator SeedsIterator
typename VDMesh::CoordRepType CoordRepType
bool differentPoint(PointType p1, PointType p2)
typename VDMesh::Pointer OutputType
FortuneSite * getRightReg(FortuneHalfEdge *he)
typename VDMesh::VoronoiEdge VoronoiEdge
void clip_line(FortuneEdge *task)
FortuneSite * getLeftReg(FortuneHalfEdge *he)
void insertEdgeList(FortuneHalfEdge *lbase, FortuneHalfEdge *lnew)
void SetRandomSeeds(int num)
void makeEndPoint(FortuneEdge *task, bool lr, FortuneSite *ends)
VoronoiDiagram2DGenerator()
typename VDMesh::EdgeInfoDQ EdgeInfoDQ
~VoronoiDiagram2DGenerator() override=default
void GenerateData() override
typename VDMesh::PointType PointType
double dist(FortuneSite *s1, FortuneSite *s2)
Implements the 2-Dimensional Voronoi Diagram.
typename MeshTraits::CoordRepType CoordRepType
typename SeedsType::iterator SeedsIterator
std::vector< PointType > SeedsType
std::deque< EdgeInfo > EdgeInfoDQ
SmartPointer< Self > Pointer
ImageBaseType::PointType PointType
static constexpr double e
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....