|
VTK
9.6.20260216
|
#include "vtkAlgorithm.h"#include "vtkIntArray.h"#include "vtkSMPTools.h"#include <algorithm>#include <iostream>#include <random>#include <vector>#include "vtkVoronoiCore.txx"Go to the source code of this file.
Classes | |
| struct | vtkVoronoiSpoke |
| Typedefs and classes in support of the adjacency graph. More... | |
| struct | vtkVoronoiWheel |
| struct | vtkVoronoiAdjacencyGraph |
| The adjacency graph, a collection of wheels and spokes, is a topological construct that connects Voronoi hull face neighbors. More... | |
| struct | vtkVoronoiAdjacencyGraph::ValidateAdjacencyGraph |
| Threaded perform validity checking. More... | |
| struct | vtkVoronoiHullVertex |
| Define hull/tile vertex types. More... | |
| struct | vtkVoronoiTileVertex |
| struct | vtkVoronoiTopoCoord3D |
| A topological coordinate of dimension N are the N+1 ids of neighboring N+1 Voronoi generator points whose spokes form half spaces intersecting at a tile (2D) / hull (3D) vertex. More... | |
| struct | vtkVoronoiTopoCoord2D |
| struct | vtkVoronoiMergeTuple3D |
| Merge tuples contain an additional point id, which is the global id of a tile/hull point, with most of these points being duplicates. More... | |
| struct | vtkVoronoiMergeTuple2D |
| struct | vtkVoronoiBatchManager |
| Class to manage batches of points. More... | |
| struct | vtkVoronoiAbortCheck |
| Convenience class to check and interrupt processing aborts during threaded processing. More... | |
| struct | vtkVoronoiRandomColors |
| struct | vtkVoronoiRandom01Range |
| struct | vtkVoronoiJoggle |
Typedefs | |
| using | vtkVoronoiSpokesType = std::vector<vtkVoronoiSpoke> |
| The vtkVoronoiWheelsType vector is used to keep track of the number of spokes (and equivalently, the number of faces) in each Voronoi tile/hull (due to dual property, there is a one-to-one correspondance between spoke and a tile edge/hull face). | |
| using | vtkVoronoiSpokesIterator = vtkVoronoiSpokesType::iterator |
| using | vtkVoronoiWheelsType = std::vector<vtkIdType> |
| using | vtkVoronoiHullVertexType = std::vector<vtkVoronoiHullVertex> |
| using | vtkVoronoiTileVertexType = std::vector<vtkVoronoiTileVertex> |
| using | vtkVoronoiTopoCoords3DType = std::vector<vtkVoronoiTopoCoord3D> |
| using | vtkVoronoiTopoCoords2DType = std::vector<vtkVoronoiTopoCoord2D> |
| using | vtkMergeTupleOffsets = std::vector<vtkIdType> |
| Global tile/hull vertices, with duplicates, that are assigned a global id (if point merging is performed). | |
| using | vtkMergeTuples3DType = std::vector<vtkVoronoiMergeTuple3D> |
| using | vtkMergeTuples2DType = std::vector<vtkVoronoiMergeTuple2D> |
| using | vtkMergeMapType = std::vector<vtkIdType> |
| When merging points, the merge map is a vector that maps global tile/hull vertex ids (which contain duplicates) into global point ids (which have duplicate points merged). | |
| using | vtkVoronoiCellConnType = std::vector<vtkIdType> |
| Convenience type for representing cell connectivity during compositing. | |
| using | vtkBatchIdsType = std::vector<vtkIdType> |
| Keep track of batches of generating points. | |
Enumerations | |
| enum class | ClipIntersectionStatus { NoIntersection = 0 , Intersection = 1 , Pruned = 2 , Numeric = 3 } |
| Classes, structs, and typedefs in support of Voronoi processing. More... | |
| enum | vtkSpokeClassification { BACKWARD_SPOKE = 0 , FORWARD_SPOKE = 1 , REGION_BOUNDARY = 2 , DOMAIN_BOUNDARY = 4 , PRUNED = 8 } |
| Classification for Voronoi spokes (and associated faces). More... | |
Functions | |
| vtkSmartPointer< vtkIntArray > | ConvertRegionLabels (vtkDataArray *inScalars) |
| using vtkVoronoiSpokesType = std::vector<vtkVoronoiSpoke> |
The vtkVoronoiWheelsType vector is used to keep track of the number of spokes (and equivalently, the number of faces) in each Voronoi tile/hull (due to dual property, there is a one-to-one correspondance between spoke and a tile edge/hull face).
The vtkVoronoiWheelsType vector is basically an array of offsets into the spokes vector.
Definition at line 86 of file vtkVoronoiCore.h.
| using vtkVoronoiSpokesIterator = vtkVoronoiSpokesType::iterator |
Definition at line 87 of file vtkVoronoiCore.h.
| using vtkVoronoiWheelsType = std::vector<vtkIdType> |
Definition at line 88 of file vtkVoronoiCore.h.
| using vtkVoronoiHullVertexType = std::vector<vtkVoronoiHullVertex> |
Definition at line 195 of file vtkVoronoiCore.h.
| using vtkVoronoiTileVertexType = std::vector<vtkVoronoiTileVertex> |
Definition at line 209 of file vtkVoronoiCore.h.
| using vtkVoronoiTopoCoords3DType = std::vector<vtkVoronoiTopoCoord3D> |
Definition at line 257 of file vtkVoronoiCore.h.
| using vtkVoronoiTopoCoords2DType = std::vector<vtkVoronoiTopoCoord2D> |
Definition at line 295 of file vtkVoronoiCore.h.
| using vtkMergeTupleOffsets = std::vector<vtkIdType> |
Global tile/hull vertices, with duplicates, that are assigned a global id (if point merging is performed).
Duplicate vertices are sorted to group them, and a merge map is built to assign global point ids without duplicates (i.e., a topological merge is performed).
Definition at line 332 of file vtkVoronoiCore.h.
| using vtkMergeTuples3DType = std::vector<vtkVoronoiMergeTuple3D> |
Definition at line 333 of file vtkVoronoiCore.h.
| using vtkMergeTuples2DType = std::vector<vtkVoronoiMergeTuple2D> |
Definition at line 334 of file vtkVoronoiCore.h.
| using vtkMergeMapType = std::vector<vtkIdType> |
When merging points, the merge map is a vector that maps global tile/hull vertex ids (which contain duplicates) into global point ids (which have duplicate points merged).
Definition at line 341 of file vtkVoronoiCore.h.
| using vtkVoronoiCellConnType = std::vector<vtkIdType> |
Convenience type for representing cell connectivity during compositing.
Definition at line 346 of file vtkVoronoiCore.h.
| using vtkBatchIdsType = std::vector<vtkIdType> |
Keep track of batches of generating points.
The threading occurs over contiguous batches of points.
Definition at line 377 of file vtkVoronoiCore.h.
|
strong |
Classes, structs, and typedefs in support of Voronoi processing.
Names have been chosen to avoid namespace collisions when mixing both 2D and 3D Voronoi algorithms in the same scope.
Implementation note: perceptive reviewers will recognize that it is possible to template this Voronoi implmentation by the dimension of the points being processed (e.g., 2D,3D) including the tile/hull generation process. However, certain properties (like the angle of 2D tiles summing to 360, and optimal Delaunay triangulation properties) suggest differing approaches in some situations (as compared to a general n-D approach). Also the clarity of the code is somewhat improved by creating separate 2D and 3D Voronoi-related classes. This of course may be changed in the future. Return values from a line/plane clip operation. Besides reporting no intersection, or a valid intersection, rare degenerate cases may also be reported– this can results in a prune, or a numeric condition.
| Enumerator | |
|---|---|
| NoIntersection | |
| Intersection | |
| Pruned | |
| Numeric | |
Definition at line 38 of file vtkVoronoiCore.h.
Classification for Voronoi spokes (and associated faces).
Different classifications may be used in different Voronoi instantiations. Since the enums are cast, we do not use enum class.
| Enumerator | |
|---|---|
| BACKWARD_SPOKE | |
| FORWARD_SPOKE | |
| REGION_BOUNDARY | |
| DOMAIN_BOUNDARY | |
| PRUNED | |
Definition at line 51 of file vtkVoronoiCore.h.
|
inline |
Definition at line 381 of file vtkVoronoiCore.h.