David-<br><br>I really do not want to start collecting geometric operations in a new geometric utilities class. Currently (for better or for worse) the VTK geometric operations are associated with the various cells with which they are consistent. This utility would be yet another place to look for stuff and is not consistent with what's in VTK now.<br>
<br>The vtkPlane problem was that one of the best fit plane arguments was a vtkDataSet* which resulted in linkage problems. Another way to accomplish something similar is to not use vtkDataSet*, instead use vtkPoints*; note that vtkPlane is already in VTK/Common. More often than not you are going to fit a plane to a set of points explicitly represented by vtkPoints (subclasses of vtkPointSet). I'd expect only in rare circumstances are you going to traverse points using vtkDataSet::GetPoint(ptId) since this would correspond to implicit datasets such as images. If necessary you could always populate a vtkPoints from an implicit dataset (use random sampling or even the whole population, better yet I would argue that implicit datasets typically have closed-form solutions to the best fit plane).<br>
<br>Will<br><br><div class="gmail_quote">On Sat, Jan 23, 2010 at 9:30 PM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div class="im">On Fri, Jan 22, 2010 at 4:05 PM, Dean Inglis <span dir="ltr"><<a href="mailto:dean.inglis@camris.ca" target="_blank">dean.inglis@camris.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi David,<br>
<br>
could this be added to vtkMath? Or what about starting<br>
a vtkGeometryUtilities or vtkGraphicsUtilities to hold static<br>
methods that are not really worthy of creating a filter class around?<br>
<br>
Dean<br>
<br>
Subject: [vtk-developers] Best fit plane function location<div><div></div><div><br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
If you'll recall, a while back we tried to add a BestFitFroMPoints function<br>
to vtkPlane. This caused some issues with cross-library linkage. Is this big<br>
enough to make a separate class: vtkBestFitPlane (or maybe<br>
vtkLeastSquaresPlane)?<br>
<br>
I noticed that there is no vtkImplicitFunctionAlgorithm, so is this usually<br>
not done?<br>
<br>
I'm thinking something like:<br>
vtkPoints* points = vtkPoints::New();<br>
// ... fill points....<br>
vtkBestFitPlane bestFitFilter = vtkBestFitPlane::New();<br>
bestFitFilter->SetInput(points);<br>
bestFitFilter->Update();<br>
<br>
vtkPlane* bestPlane = bestFitFilter->GetOutput();<br>
<br>
Thoughts?<br>
<br>
Thanks,<br>
<br>
David<br>
<br><br></blockquote></div></div></blockquote><div><br></div></div><div class="gmail_quote">For now I could add it to vtkMath, but as you suggest, we wouldn't want to clutter vtkMath. I like the idea of a vtkGeometricUtilities class for things like this.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Any other thoughts? Anyone agree/disagree?</div><br clear="all">Thanks,<br><font color="#888888"><br><div>David</div></font></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br><br clear="all"><br>-- <br>William J. Schroeder, PhD<br>Kitware, Inc.<br>28 Corporate Drive<br>Clifton Park, NY 12065<br><a href="mailto:will.schroeder@kitware.com">will.schroeder@kitware.com</a><br>
<a href="http://www.kitware.com">http://www.kitware.com</a><br>(518) 881-4902<br>
<input id="gwProxy" type="hidden"><input onclick="jsCall();" id="jsProxy" type="hidden"><div id="refHTML"></div>