[vtk-developers] Best fit plane function location

David Cole david.cole at kitware.com
Mon Jan 25 10:57:44 EST 2010


To clarify: are you (1) eliminating the dependency on vtkDataSet in the
method signature or (2) putting the method someplace that is allowed to
depend on vtkDataSet?


On Mon, Jan 25, 2010 at 10:40 AM, David Doria
<daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>
> wrote:

> On Mon, Jan 25, 2010 at 9:56 AM, Biddiscombe, John A. <biddisco at cscs.ch>
> wrote:
> > erratum : Should have read something like
> >
> > if (vtkPointSet::SafeDownCast(dataset)) {
> >  BestFit(vtkPointSet::SafeDownCast(dataset)->GetPoints())
> > }
> > else {
> >  copy stuff
> > }
> >
> >> -----Original Message-----
> >> From: vtk-developers-bounces at vtk.org [mailto:
> vtk-developers-bounces at vtk.org]
> >> On Behalf Of Biddiscombe, John A.
> >> Sent: 25 January 2010 15:52
> >> To: David Doria
> >> Cc: VTK Developers
> >> Subject: Re: [vtk-developers] Best fit plane function location
> >>
> >> if (dataset->IsTypeOf(vtkPoints)) {
> >>   BestFit(vtkPoints::SafeDownCast(dataset)->GetPoints())
> >> }
> >> else {
> >>   copy stuff
> >> }
> >>
> >>
> >> > void vtkTextureMapToPlane::ComputeNormal(vtkDataSet *input)
> >> > {
> >> >  vtkSmartPointer<vtkPoints> points =
> vtkSmartPointer<vtkPoints>::New();
> >> >  for(unsigned int i = 0; i < input->GetNumberOfPoints(); i++)
> >> >    {
> >> >    double p[3];
> >> >    input->GetPoint(i, p);
> >> >    points->InsertNextPoint(p);
> >> >    }
> >> >
> >> > ... BestFit(points)...
> >> >
> >> > like I had originally?
> >> >
> >> > Thanks,
> >> >
> >> > David
>
> Yep, that would work. Everyone OK with that?
>
> Thanks,
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100125/c0ebaf4d/attachment.html>


More information about the vtk-developers mailing list