18 #ifndef __itkVoronoiDiagram2D_h
19 #define __itkVoronoiDiagram2D_h
50 template<
typename TCoordType >
52 public Mesh< TCoordType, 2,
53 DefaultDynamicMeshTraits< TCoordType, 2, 2, TCoordType > >
72 itkStaticConstMacro(PointDimension,
unsigned int,
73 MeshTraits::PointDimension);
74 itkStaticConstMacro(MaxTopologicalDimension,
unsigned int,
75 MeshTraits::MaxTopologicalDimension);
137 typedef typename PointCellLinksContainer::const_iterator
156 itkGetConstMacro(NumberOfSeeds,
unsigned int);
184 void GetPoint(
int pId,
PointType *answer);
217 m_CellNeighborsID[x[0]].push_back(x[1]);
218 m_CellNeighborsID[x[1]].push_back(x[0]);
221 void ClearRegion(
int i)
222 { m_VoronoiRegions[i]->ClearPoints(); }
223 void VoronoiRegionAddPointId(
int id,
int x)
224 { m_VoronoiRegions[id]->AddPointId(x); }
225 void BuildEdge(
int id)
226 { m_VoronoiRegions[id]->BuildEdges(); }
230 void VertexListClear()
232 if ( this->m_PointsContainer.IsNull() )
234 this->m_PointsContainer = PointsContainer::New();
237 this->m_PointsContainer->Initialize();
242 int VertexListSize(){
return static_cast< int >(this->m_PointsContainer->Size()); }
245 void AddVert(
PointType x){ this->m_PointsContainer->InsertElement(this->m_PointsContainer->Size(), x);}
253 x[0] = m_EdgeList[id].m_LeftID;
254 x[1] = m_EdgeList[id].m_RightID;
262 virtual void PrintSelf(std::ostream & os,
Indent indent)
const;
266 void operator=(
const Self &);
280 #ifndef ITK_MANUAL_INSTANTIATION
281 #include "itkVoronoiDiagram2D.hxx"