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.<br><br><div class="gmail_quote">On Wed, Sep 29, 2010 at 1:22 PM, David Doria <span dir="ltr"><<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im"><div class="gmail_quote">On Wed, Sep 29, 2010 at 1:08 PM, Andy Bauer <span dir="ltr"><<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I broke up the times between kdtree build time and search time and the search time dominates the build time. <br><br>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.<br>
<font color="#888888">
<br>Andy</font><div><div></div><div></div></div></blockquote></div><br></div><div>I replaced the vtkSphereSource with a:</div><div><br></div><div><div> vtkSmartPointer<vtkPointSource> reader =</div><div> vtkSmartPointer<vtkPointSource>::New();</div>
<div> reader->SetNumberOfPoints(10000);</div><div> reader->SetRadius(5);</div><div> reader->Update();</div></div><div><br></div><div>The run time is still pretty much flat across this SetMaxLevel parameter.</div>
<div><br><font color="#888888">David</font></div>
</blockquote></div><br>