[vtkusers] Design question (dataset relationship)

Will Schroeder will.schroeder at kitware.com
Thu Sep 7 20:49:58 EDT 2000

At 05:29 PM 9/7/2000 +0200, Sebastien BARRE wrote:
>At 10:35 07/09/00 -0400, Gerald Dalley a écrit:
>>For some range image registration work I've been doing, yes, I've done that.
>>I tried using some of the built-in locators, but found one of the
>>fundamental requirements of the base classes to be too stringent: the search
>>point must be inside the bounding box of the dataset being searched.
>Wow. Do the VTK gurus confirm ?
>I see : "vtkPointLocator works by dividing a specified region of space 
>into a regular array of "rectangular" buckets, and then keeping a list of 
>points that lie in each bucket.".
>Thus I guess if the search point is not in the dataset, it has no chance 
>to fall in a bucket :(

There is a lot of room for improvement in the locators. Not only do they 
need to know the initial bounding box prior to point insertion, but they 
are not good in situations requiring adaptive behavior (i.e., the 
subdivision of the locators is uniform). For example, if you have an 
unstructured grid with 90% of the mesh in a thin boundary layer, and try to 
contour it, you start getting very bad performance. You can always increase 
the resolution of the locator but this takes up a ton of memory. What would 
be better would be an adaptive scheme like a non-uniform octree or kd tree.

It's open-source...volunteers?

>>vtkPointLocator class code can be hacked to remove this restriction, but I
>>stopped halfway through.
>I'm planning to use vtkCellLocator, as my data is 3D, and indeed I want to 
>find the closest point along a direction (the normal to the point), thus :
>int vtkCellLocator::IntersectWithLine
>"Return intersection point (if any) AND the cell which was intersected by 
>the finite line"
>Then, given the intersection, find the closest point of the cell to this 
>I hope the two end-points do not have to be in the dataset bounds, 
>otherwise I'm in trouble :)

They don't have to be.

>>The best place I could come up with for storing this data was in the field
>>data.  In the point data, I had fields such as "ClosestPoint.Branch"
>>(indicates Bi) and "ClosestPoint.ID" (ID of the closest point within Bi).
>>For my particular application, I also stored additional information such as
>>the distance between the point pairs, "ClosestPoint.Distance".

Dr. William J. Schroeder
VTK-Based Visualization Solutions, Kitware, Inc.
469 Clifton Corporate Parkway
Clifton Park, NY 12065 USA
will.schroeder at kitware.com
1-518-371-3971 x102

More information about the vtkusers mailing list