[vtkusers] Design question (dataset relationship)

Gerald Dalley dalleyg at ee.eng.ohio-state.edu
Thu Sep 7 12:17:13 EDT 2000


> -----Original Message-----
> From: vtkusers-admin at public.kitware.com
> [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Sebastien BARRE
> Sent: Thursday, 07 September, 2000 11:29 AM
> To: dalleyg at dma.org
> Cc: VTK Users
> Subject: RE: [vtkusers] Design question (dataset relationship)
>
>
> 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 :(

The algorithm used by vtkPointLocator starts in the bucket that the search
point is in.  If a point in the data set is not found, it expands to
searching all of those surrounding the bucket.  It keeps searching larger
and larger shells until either a point is found or all of the buckets have
been searched.

If the search point is not located within the bounding box of the dataset to
be searched, there is a tendency to end up doing a linear search if you
modify the source code to handle, but FindClosestPoint can be modified to
handle these cases: allow for quick-fail searching of non-existent buckets
(which is already partially implemented).  I'd imagine that similar
extensions could be made to the other methods, but I haven't looked in
detail.

...clipped...

> >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 ?

Yeah, here's what I ended up doing:

Field				Data Type
=====				=========
ClosestPoint.Branch	IntArray
ClosestPoint.ID		IntArray
ClosestPoint.Distance	FloatArray

--Gerald Dalley
  dalleyg at ee.eng.ohio-state.edu





More information about the vtkusers mailing list