Section: Visualization Toolkit Filtering Classes
To create an instance of class vtkIncrementalOctreePointLocator, simply invoke its constructor as follows
obj = vtkIncrementalOctreePointLocator
obj
is an instance of the vtkIncrementalOctreePointLocator class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkIncrementalOctreePointLocator = obj.NewInstance ()
vtkIncrementalOctreePointLocator = obj.SafeDownCast (vtkObject o)
obj.SetMaxPointsPerLeaf (int )
- Set/Get the maximum number of points that a leaf node may maintain.
Note that the actual number of points maintained by a leaf node might
exceed this threshold if there is a large number (equal to or greater
than the threshold) of exactly duplicate points (with zero distance)
to be inserted (e.g., to construct an octree for subsequent point
location) in extreme cases. Respecting this threshold in such scenarios
would cause endless node sub-division. Thus this threshold is broken, but
only in case of such situations.
int = obj.GetMaxPointsPerLeafMinValue ()
- Set/Get the maximum number of points that a leaf node may maintain.
Note that the actual number of points maintained by a leaf node might
exceed this threshold if there is a large number (equal to or greater
than the threshold) of exactly duplicate points (with zero distance)
to be inserted (e.g., to construct an octree for subsequent point
location) in extreme cases. Respecting this threshold in such scenarios
would cause endless node sub-division. Thus this threshold is broken, but
only in case of such situations.
int = obj.GetMaxPointsPerLeafMaxValue ()
- Set/Get the maximum number of points that a leaf node may maintain.
Note that the actual number of points maintained by a leaf node might
exceed this threshold if there is a large number (equal to or greater
than the threshold) of exactly duplicate points (with zero distance)
to be inserted (e.g., to construct an octree for subsequent point
location) in extreme cases. Respecting this threshold in such scenarios
would cause endless node sub-division. Thus this threshold is broken, but
only in case of such situations.
int = obj.GetMaxPointsPerLeaf ()
- Set/Get the maximum number of points that a leaf node may maintain.
Note that the actual number of points maintained by a leaf node might
exceed this threshold if there is a large number (equal to or greater
than the threshold) of exactly duplicate points (with zero distance)
to be inserted (e.g., to construct an octree for subsequent point
location) in extreme cases. Respecting this threshold in such scenarios
would cause endless node sub-division. Thus this threshold is broken, but
only in case of such situations.
obj.SetBuildCubicOctree (int )
- Set/Get whether the search octree is built as a cubic shape or not.
int = obj.GetBuildCubicOctree ()
- Set/Get whether the search octree is built as a cubic shape or not.
obj.BuildCubicOctreeOn ()
- Set/Get whether the search octree is built as a cubic shape or not.
obj.BuildCubicOctreeOff ()
- Set/Get whether the search octree is built as a cubic shape or not.
vtkPoints = obj.GetLocatorPoints ()
- Get access to the vtkPoints object in which point coordinates are stored
for either point location or point insertion.
obj.Initialize ()
- Delete the octree search structure.
obj.FreeSearchStructure ()
- Delete the octree search structure.
obj.GetBounds (double bounds)
- Get the spatial bounding box of the octree.
int = obj.GetNumberOfPoints ()
- Get the number of points maintained by the octree.
vtkIdType = obj.FindClosestInsertedPoint (double x[3])
- Given a point x assumed to be covered by the octree, return the index of
the closest in-octree point regardless of the associated minimum squared
distance relative to the squared insertion-tolerance distance. This method
is used when performing incremental point insertion. Note -1 indicates that
no point is found. InitPointInsertion() should have been called in advance.
obj.GenerateRepresentation (int nodeLevel, vtkPolyData polysData)
- Create a polygonal representation of the octree boundary (from the root
node to a specified level).
obj.BuildLocator ()
- Load points from a dataset to construct an octree for point location.
This function resorts to InitPointInsertion() to fulfill some of the work.
vtkIdType = obj.FindClosestPoint (double x[3])
- Given a point x, return the id of the closest point. BuildLocator() should
have been called prior to this function. This method is thread safe if
BuildLocator() is directly or indirectly called from a single thread first.
vtkIdType = obj.FindClosestPoint (double x, double y, double z)
- Given a point (x, y, z), return the id of the closest point. Note that
BuildLocator() should have been called prior to this function. This method
is thread safe if BuildLocator() is directly or indirectly called from a
single thread first.
vtkIdType = obj.FindClosestPoint (double x[3], double miniDist2)
- Given a point x, return the id of the closest point and the associated
minimum squared distance (via miniDist2). Note BuildLocator() should have
been called prior to this function. This method is thread safe if
BuildLocator() is directly or indirectly called from a single thread first.
vtkIdType = obj.FindClosestPoint (double x, double y, double z, double miniDist2)
- Given a point (x, y, z), return the id of the closest point and the
associated minimum squared distance (via miniDist2). BuildLocator() should
have been called prior to this function. This method is thread safe if
BuildLocator() is directly or indirectly called from a single thread first.
obj.FindPointsWithinRadius (double R, double x[3], vtkIdList result)
- Find all points within a radius R relative to a given point x. The returned
point ids (stored in result) are not sorted in any way. BuildLocator() should
have been called prior to this function. This method is thread safe if
BuildLocator() is directly or indirectly called from a single thread first.
obj.FindPointsWithinSquaredRadius (double R2, double x[3], vtkIdList result)
- Find all points within a squared radius R2 relative to a given point x. The
returned point ids (stored in result) are not sorted in any way. BuildLocator()
should have been called prior to this function. This method is thread safe if
BuildLocator() is directly or indirectly called from a single thread first.
obj.FindClosestNPoints (int N, double x[3], vtkIdList result)
- Find the closest N points to a given point. The returned point ids (via
result) are sorted from closest to farthest. BuildLocator() should have
been called prior to this function. This method is thread safe if
BuildLocator() is directly or indirectly called from a single thread first.
int = obj.InitPointInsertion (vtkPoints points, double bounds[6])
- Initialize the point insertion process. points is an object, storing 3D
point coordinates, to which incremental point insertion put coordinates.
It is created and provided by an external VTK class. Argument bounds
represents the spatial bounding box, into which the points fall. In fact,
an adjusted version of the bounding box is used to build the octree to
make sure no any point (to be inserted) falls outside the octree. This
function is not thread safe.
int = obj.InitPointInsertion (vtkPoints points, double bounds[6], vtkIdType estSize)
- Initialize the point insertion process. points is an object, storing 3D
point coordinates, to which incremental point insertion put coordinates.
It is created and provided by an external VTK class. Argument bounds
represents the spatial bounding box, into which the points fall. In fact,
an adjusted version of the bounding box is used to build the octree to
make sure no any point (to be inserted) falls outside the octree. Argument
estSize specifies the initial estimated size of the vtkPoints object. This
function is not thread safe.
vtkIdType = obj.IsInsertedPoint (double x[3])
- Determine whether or not a given point has been inserted into the octree.
Return the id of the already inserted point if true, otherwise return -1.
InitPointInsertion() should have been called in advance.
vtkIdType = obj.IsInsertedPoint (double x, double y, double z)
- Determine whether or not a given point has been inserted into the octree.
Return the id of the already inserted point if true, otherwise return -1.
InitPointInsertion() should have been called in advance.
obj.InsertPoint (vtkIdType ptId, double x[3])
- Insert a given point into the octree with a specified point index ptId.
InitPointInsertion() should have been called prior to this function. In
addition, IsInsertedPoint() should have been called in advance to ensure
that the given point has not been inserted unless point duplication is
allowed (Note that in this case, this function involves a repeated leaf
container location). vtkPoints::InsertPoint() is invoked.
vtkIdType = obj.InsertNextPoint (double x[3])
- Insert a given point into the octree and return the point index. Note that
InitPointInsertion() should have been called prior to this function. In
addition, IsInsertedPoint() should have been called in advance to ensure
that the given point has not been inserted unless point duplication is
allowed (in this case, this function invovles a repeated leaf container
location). vtkPoints::InsertNextPoint() is invoked.