[vtkusers] Re: Speed up vtkKdTree::FindClosestPoint

sigmunau at idi.ntnu.no sigmunau at idi.ntnu.no
Tue Feb 1 12:23:23 EST 2005


On Tue, Feb 01, 2005 at 10:11:47AM -0700, lee ann fisk wrote:
> On Tue, 2005-02-01 at 09:33, sigmunau at idi.ntnu.no wrote:
> > At last a question about the KdTree: Would it be possible to extend this
> > class to also support finding closest point on a more general dataset?	I am
> > thinking about something like this: 
> > * Find closest point among cell-node and cell centroids
> > * Find closest point on cell(s) containing this point.
> > * Return closest point of points return in above statement.
> > 
> > I guess this approch isn't 100% correct in all situations, but will do very
> > often provided the dataset doesn't represent too exotic shapes.
> 
> The locator is built from a list of points, and doesn't know
> about cell membership.  I think you would need to write
> another BuildLocatorFromPoints that also takes a vtkCellArray
> and a location array (giving the location of the start of
> each cell in the vtkCellArray), and manages these lists along
> with the list of points.  Then you could answer cell-based
> queries.
I was more thinking along the lines of extending FindClosestPoint to work on
locators built using SetData() and BuildLocator(), but this method could
work as well.

Sigmund


> 
> Lee Ann
> 
> -- 
> ================================================================
> Lee Ann Fisk                                 lafisk at sandia.gov
> Department 9215                             Phone 505-844-2059
> Discrete Algorithms and Math                  Fax 505-845-7442
> Sandia National Laboratories                    Mail stop 1110
> Albuquerque, NM, USA                             Office 980/15
> ================================================================
> 
> 
> 
> X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on hobbes
> X-Spam-Level: 
> X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,MISSING_DATE,
> 	MISSING_HEADERS,MISSING_SUBJECT autolearn=unavailable version=3.0.2
> 
> X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on hobbes
> X-Spam-Level: 
> X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,MISSING_DATE,
> 	MISSING_HEADERS,MISSING_SUBJECT autolearn=unavailable version=3.0.2



More information about the vtkusers mailing list