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