18 #ifndef itkVoronoiDiagram2DGenerator_h
19 #define itkVoronoiDiagram2DGenerator_h
45 template<
typename TCoordType >
47 public MeshSource< VoronoiDiagram2D< TCoordType > >
76 itkGetConstMacro(NumberOfSeeds,
unsigned int);
104 void SetRandomSeeds(
int num);
112 void PrintSelf(std::ostream & os,
Indent indent)
const override;
115 void GenerateData()
override;
118 unsigned int m_NumberOfSeeds{ 0 };
161 float m_A{0.0}, m_B{0.0}, m_C{0.0};
169 m_Ep[0] = m_Ep[1] = m_Reg[0] = m_Reg[1] =
nullptr;
196 m_Right(edge.m_Right),
200 m_Ystar(edge.m_Ystar),
207 double m_Pxmin{ 0.0 };
208 double m_Pxmax{ 0.0 };
209 double m_Pymin{ 0.0 };
210 double m_Pymax{ 0.0 };
211 double m_Deltax{ 0.0 };
212 double m_Deltay{ 0.0 };
213 double m_SqrtNSites{ 0.0 };
215 unsigned int m_PQcount{ 0 };
217 unsigned int m_PQhashsize{ 0 };
218 unsigned int m_Nedges{ 0 };
219 unsigned int m_Nvert{ 0 };
223 unsigned int m_ELhashsize{ 0 };
238 unsigned char Pointonbnd(
int VertID);
240 void GenerateVDFortune();
242 void ConstructDiagram();
286 #ifndef ITK_MANUAL_INSTANTIATION
287 #include "itkVoronoiDiagram2DGenerator.hxx"
std::vector< FortuneHalfEdge * > m_ELHash
Light weight base class for most itk classes.
Define numeric traits for std::vector.
typename VDMesh::CoordRepType CoordRepType
typename VDMesh::VoronoiEdge VoronoiEdge
std::vector< PointType > SeedsType
typename VDMesh::Pointer OutputType
Implements the 2-Dimensional Voronoi Diagram.
std::vector< FortuneHalfEdge > m_PQHash
typename VDMesh::EdgeInfoDQ EdgeInfoDQ
std::deque< EdgeInfo > EdgeInfoDQ
std::vector< FortuneSite > m_SeedSites
FortuneHalfEdge m_ELrightend
Base class for all process objects that output mesh data.
FortuneHalfEdge(const FortuneHalfEdge &edge)
typename VDMesh::EdgeInfo EdgeInfo
void GenerateOutputInformation() override
Small data structures for Fortune's Method and some public variables/methods not for external access...
typename VDMesh::SeedsType SeedsType
FortuneSite * m_BottomSite
static constexpr double e
The base of the natural logarithm or Euler's number
Implement the Sweep Line Algorithm for the construction of the 2D Voronoi Diagram.
typename MeshTraits::CoordRepType CoordRepType
Control indentation during Print() invocation.
FortuneHalfEdge m_ELleftend
ImageBaseType::PointType PointType
typename VDMesh::SeedsIterator SeedsIterator
A templated class holding a geometric point in n-Dimensional space.
typename VDMesh::PointType PointType
typename SeedsType::iterator SeedsIterator
FortuneHalfEdge * m_Right