[vtkusers] Design question (dataset relationship)

Sebastien BARRE seb-ml-vtk at barre.nom.fr
Thu Sep 7 11:29:19 EDT 2000

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 :(

>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 :)

>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".

I see. I guess Bi is an integer or like ?

Thanks for the clue.

More information about the vtkusers mailing list