Section: Visualization Toolkit Filtering Classes
This class can also generate a PolyData representation of the boundaries of the spatial regions in the decomposition.
To create an instance of class vtkOctreePointLocator, simply invoke its constructor as follows
obj = vtkOctreePointLocator
obj is an instance of the vtkOctreePointLocator class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkOctreePointLocator = obj.NewInstance ()
vtkOctreePointLocator = obj.SafeDownCast (vtkObject o)
obj.SetMaximumPointsPerRegion (int ) - Maximum number of points per spatial region. Default is 100.
int = obj.GetMaximumPointsPerRegion () - Maximum number of points per spatial region. Default is 100.
obj.SetCreateCubicOctants (int ) - Get/Set macro for CreateCubicOctants.
int = obj.GetCreateCubicOctants () - Get/Set macro for CreateCubicOctants.
double = obj.GetFudgeFactor () - Some algorithms on octrees require a value that is a very
small distance relative to the diameter of the entire space
divided by the octree. This factor is the maximum axis-aligned
width of the space multipled by 10e-6.
obj.SetFudgeFactor (double ) - Some algorithms on octrees require a value that is a very
small distance relative to the diameter of the entire space
divided by the octree. This factor is the maximum axis-aligned
width of the space multipled by 10e-6.
obj.GetBounds (double bounds) - Get the spatial bounds of the entire octree space. Sets
bounds array to xmin, xmax, ymin, ymax, zmin, zmax.
int = obj.GetNumberOfLeafNodes () - The number of leaf nodes of the tree, the spatial regions
obj.GetRegionBounds (int regionID, double bounds[6]) - Get the spatial bounds of octree region
obj.GetRegionDataBounds (int leafNodeID, double bounds[6]) - Get the bounds of the data within the leaf node
int = obj.GetRegionContainingPoint (double x, double y, double z) - Get the id of the leaf region containing the specified location.
obj.BuildLocator () - Create the octree decomposition of the cells of the data set
or data sets. Cells are assigned to octree spatial regions
based on the location of their centroids.
vtkIdType = obj.FindClosestPoint (double x[3]) - Return the Id of the point that is closest to the given point.
Set the square of the distance between the two points.
obj.FindPointsWithinRadius (double radius, double x[3], vtkIdList result) - Find all points within a specified radius of position x.
The result is not sorted in any specific manner.
obj.FindClosestNPoints (int N, double x[3], vtkIdList result) - Find the closest N points to a position. This returns the closest
N points to a position. A faster method could be created that returned
N close points to a position, but not necessarily the exact N closest.
The returned points are sorted from closest to farthest.
These methods are thread safe if BuildLocator() is directly or
indirectly called from a single thread first.
vtkIdTypeArray = obj.GetPointsInRegion (int leafNodeId) - Get a list of the original IDs of all points in a leaf node.
obj.FreeSearchStructure () - Delete the octree data structure.
obj.GenerateRepresentation (int level, vtkPolyData pd) - Create a polydata representation of the boundaries of
the octree regions.
obj.FindPointsInArea (double area, vtkIdTypeArray ids, bool clearArraytrue) - Fill ids with points found in area. The area is a 6-tuple containing
(xmin, xmax, ymin, ymax, zmin, zmax).
This method will clear the array by default. To append ids to an array,
set clearArray to false.