[vtkusers] KDTree timing demo
Andy Bauer
andy.bauer at kitware.com
Wed Sep 29 13:53:59 EDT 2010
Now I'm not sure why you're not getting the search times to decrease. At
this point I think you'd have to profile the code to see where the time is
being spent.
On Wed, Sep 29, 2010 at 1:22 PM, David Doria <daviddoria at gmail.com> wrote:
> On Wed, Sep 29, 2010 at 1:08 PM, Andy Bauer <andy.bauer at kitware.com>wrote:
>
>> I broke up the times between kdtree build time and search time and the
>> search time dominates the build time.
>>
>> I'm guessing that the problem is that the grid isn't suited for the kd
>> tree point locator. This happens when the points have some "uneven"
>> clustering that results in the geometry of the bins in the kd tree to have
>> large aspect ratios (1 or 2 direction lengths dominates the others). If you
>> try an image data/uniform grid with the cells having equal lengths on each
>> side you should see the timing drop down as the number of kd tree levels is
>> increased.
>>
>> Andy
>>
>
> I replaced the vtkSphereSource with a:
>
> vtkSmartPointer<vtkPointSource> reader =
> vtkSmartPointer<vtkPointSource>::New();
> reader->SetNumberOfPoints(10000);
> reader->SetRadius(5);
> reader->Update();
>
> The run time is still pretty much flat across this SetMaxLevel parameter.
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100929/420a2b92/attachment.htm>
More information about the vtkusers
mailing list