101 #ifndef vtkVoronoiCore3D_h
102 #define vtkVoronoiCore3D_h
112 VTK_ABI_NAMESPACE_BEGIN
180 return (ptId >= 0 && this->Regions[ptId] >= 0);
189 return (!this->Regions || this->Regions[ptId] == this->Regions[neiId]);
197 template <
class TCompositor,
class TClassifier>
217 this->LocalBatches.reserve(2048);
218 this->LocalSpokes.reserve(2048);
226 template <
class TCompositor,
class TClassifier>
227 using ThreadMapType = std::vector<vtkVoronoi3DLocalData<TCompositor, TClassifier>*>;
241 template <
class TCompositor,
class TClassifier = vtkVoronoiClassifier3D>
261 static std::unique_ptr<vtkVoronoiCore3D<TCompositor, TClassifier>>
Execute(
vtkAlgorithm* filter,
263 vtkIdType maxClips,
bool validate,
double pruneTol, TCompositor* comp, TClassifier* cl);
302 double pruneTol, TCompositor* comp, TClassifier* c);
363 const double* Points;
367 double PaddedBounds[6];
373 double PruneTolerance;
377 int MaximumNumberOfPoints;
378 int MaximumNumberOfFaces;
448 static std::unique_ptr<TopologicalMerge>
Execute(
520 maxPoints = (hull.
NumPts > maxPoints ? hull.
NumPts : maxPoints);
536 return (ptId >= 0 && this->Regions[ptId] >= 0);
541 return (!this->Regions || this->Regions[ptId] == this->Regions[neiId]);
545 VTK_ABI_NAMESPACE_END
546 #include "vtkVoronoiCore3D.txx"
const double * GetPoints()
int GetNumberOfPrunes()
Obtain information about the execution of the Voronoi algorithm.
std::vector< vtkIdType > vtkBatchIdsType
Keep track of batches of generating points.
vtkVoronoi3DLocalData< TCompositor, TClassifier > * GetThreadData(int threadNum)
Access the local thread data produced by execution of the filter.
The following thread local data is used to process and keep track of information on a per-thread basi...
bool IsInsideRegion(vtkIdType ptId)
The polyhedron class proper.
vtkVoronoiAdjacencyGraph Graph
This is used to create the spokes and wheels adjacency graph used to validate the tessellation and pr...
static std::unique_ptr< TopologicalMerge > Execute(vtkVoronoiCore3D< TCompositor, TClassifier > *vc)
void Initialize(vtkEmptyVoronoi3DClassifier *c)
const vtkVoronoiSpoke * AddAdjacencyInformation(vtkVoronoiHull &hull, vtkVoronoiWheelsType &wheels, vtkVoronoiSpokesType &spokes, int &numSpokes, int &maxPoints, int &maxFaces)
void Initialize(vtkVoronoiClassifier3D *c)
void Initialize()
Core vtkSMPTools methods to process hulls in parallel, and produce thread local output data...
Functor class used to topologically merge (nearly) coincident points.
TCompositor::LocalData Compositor
vtkVoronoiCore3D< TCompositor, TClassifier > * VC
TCompositor Compositor
The compositor enables this vtkVoronoiCore3D templated class to be used in different applications...
void operator()(vtkIdType batchId, vtkIdType endBatchId)
Core vtkSMPTools methods to process hulls in parallel, and produce thread local output data...
vtkEmptyVoronoi3DClassifier(const int *regions)
ProduceWheelsAndSpokes(vtkVoronoiCore3D< TCompositor, TClassifier > *vc)
vtkVoronoiCore3D< TCompositor, TClassifier > * VC
std::vector< vtkIdType > vtkVoronoiWheelsType
std::vector< vtkIdType > vtkMergeMapType
When merging points, the merge map is a vector that maps global tile/hull vertex ids (which contain d...
These are convenience/demonstration classes for configuring the templated 3D Voronoi classes...
TopologicalMerge(vtkVoronoiCore3D< TCompositor, TClassifier > *vc)
vtkIdType GetNumberOfPoints()
Convenience methods to retrieve the number of input points, and the raw double* points array...
int GetNumberOfThreads()
Access the local thread data produced by execution of the filter.
vtkIdType GetNumberOfMergedPoints()
Methods related to merging coincident points.
void Initialize(vtkIdType numPts, vtkEmptyVoronoi3DCompositor *)
Prepare to accumulate compositing information: specify the total number of generating points to be pr...
vtkShellBinIterator SIter
Superclass for all sources, filters, and sinks in VTK.
bool IsSameRegion(vtkIdType ptId, vtkIdType neiId)
vtkMergeTuples3DType MergeTuples
Thread local data may be needed.
static std::unique_ptr< vtkVoronoiCore3D< TCompositor, TClassifier > > Execute(vtkAlgorithm *filter, unsigned int batchSize, vtkStaticPointLocator *loc, vtkPoints *inPts, double padding, vtkIdType maxClips, bool validate, double pruneTol, TCompositor *comp, TClassifier *cl)
A factory method to conveniently instantiate and execute the algorithm.
bool IsInsideRegion(vtkIdType ptId)
vtkVoronoiSpokesType LocalSpokes
Typedefs and classes in support of the adjacency graph.
vtkBatchIdsType LocalBatches
int GetMaximumNumberOfFaces()
Obtain information about the execution of the Voronoi algorithm.
bool IsSameRegion(vtkIdType ptId, vtkIdType neiId)
A fast, lightweight class for iterating over the bins of a 3D vtkStaticPointLocator.
ThreadMapType< TCompositor, TClassifier > ThreadMap
int GetMaximumNumberOfPoints()
Obtain information about the execution of the Voronoi algorithm.
vtkVoronoiAdjacencyGraph & GetAdjacencyGraph()
Obtain the adjacency graph (wheel & spokes data structure).
The adjacency graph, a collection of wheels and spokes, is a topological construct that connects Voro...
vtkAlgorithm * Filter
Used for controlling filter abort and accessing filter information.
quickly locate points in 3-space
TClassifier Classifier
This templated class is used to extend the API of this vtkVoronoiCore3D class, to implement the spoke...
void Initialize(vtkEmptyVoronoi3DCompositor *c)
vtkEmptyVoronoi3DClassifier()
========================================================================= The templated, core Voronoi class.
void AddData(vtkVoronoiHull &hull, int numSpokes, const vtkVoronoiSpoke *spokes)
Implementation note about the compositor.
std::vector< vtkVoronoiMergeTuple3D > vtkMergeTuples3DType
void operator()(vtkIdType threadId, vtkIdType endThreadId)
Represent an array of vtkDist2Tuples.
std::vector< vtkVoronoiSpoke > vtkVoronoiSpokesType
The vtkVoronoiWheelsType vector is used to keep track of the number of spokes (and equivalently...
void Reduce()
Core vtkSMPTools methods to process hulls in parallel, and produce thread local output data...
Class to manage batches of points.
const vtkVoronoiSpoke * AddAdjacencyInformation(vtkVoronoiHull &hull, vtkVoronoiWheelsType &wheels, vtkVoronoiSpokesType &spokes, int &numSpokes, int &maxPoints, int &maxFaces)
vtkVoronoiClassifier3D(const int *regions)
vtkVoronoiCore3D(vtkAlgorithm *filter, vtkVoronoiBatchManager &batcher, vtkStaticPointLocator *loc, vtkPoints *inPts, double padding, vtkIdType maxClips, bool validate, double pruneTol, TCompositor *comp, TClassifier *c)
Constructor.
vtkVoronoiBatchManager Batcher
Controls processing of batches of generating points.
void operator()(vtkIdType threadId, vtkIdType endThreadId)
std::vector< vtkVoronoi2DLocalData< TCompositor, TClassifier > * > ThreadMapType
The thread map keeps track of the thread local data across all computing threads. ...
static void Execute(vtkVoronoiCore3D< TCompositor, TClassifier > *vc)
represent and manipulate 3D points
Produce the global adjacency graph / wheels and spokes data structure.