[vtkusers] I need to get the X, Y, Z coordinates of a point in a vtkPolyData

Alessandro Artusi artusialessandro4 at googlemail.com
Mon Oct 26 09:16:50 EDT 2009


Dear Bill thanks a lot but it does not work I have still the same Attribute
error.

I repeat contour is where i store the output of teh vtkContourFilter(), may
be it does not inerithance the GetPoints().....

Any other suggestion?

The vtkContourFilter has not any

On Mon, Oct 26, 2009 at 2:44 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:

> You must do
> contour.Update()
>
> before accessing the points.
>
> On Mon, Oct 26, 2009 at 8:26 AM, Alessandro Artusi
> <artusialessandro4 at googlemail.com> wrote:
> > Thanks a lot Jerome,
> >
> > I get an errore:
> >
> > AttributeError GetPoints.
> >
> > May be I am doing something wrong; what i  am doing is the following:
> >
> > contour = vtk.vtkContourFilter()
> > contour.SetInput(grid) #grid is rectilineargrid()
> > contour.ComputeNormalOn()
> > contour.SetValue(0, 95) #my isovalue
> >
> > in contour i should have my polyData right?
> >
> > when i do what you suggested:
> >
> > contour.GetPoints( ).GetPoint( pointId, coord )
> >
> > I got the error.
> >
> > Any suggestion?
> >
> > Thanks again,
> > Alessandro.
> >
> >
> > On Mon, Oct 26, 2009 at 1:11 PM, Jérôme <jerome.velut at gmail.com> wrote:
> >>
> >> Hi,
> >> vtkPolyData is a vtkPointSet : you can access points coordinates through
> >>
> >> polydata->GetPoints( )->GetPoint( pointId, coord )
> >>
> >> where polydata is your... polydata, pointId is the point Id you want to
> >> get (from 0 to NumberOfPoints - 1) and coord is double coord[3] filled
> by
> >> the point coordinate.
> >>
> >> HTH
> >> Jerome
> >>
> >> 2009/10/26 Alessandro Artusi <artusialessandro4 at googlemail.com>
> >>>
> >>> Dear All,
> >>>
> >>> I have a vtkPolyData from the vtkContourFilter and I need to get the
> >>> X,Y,Z coordinates of each point in the PolyData. This because I need to
> >>> convert them.
> >>> How can i get this info?
> >>>
> >>> Thanks a lot for teh help,
> >>> Alessandro.
> >>>
> >>>
> >>> _______________________________________________
> >>> Powered by www.kitware.com
> >>>
> >>> Visit other Kitware open-source projects at
> >>> http://www.kitware.com/opensource/opensource.html
> >>>
> >>> Please keep messages on-topic and check the VTK FAQ at:
> >>> http://www.vtk.org/Wiki/VTK_FAQ
> >>>
> >>> Follow this link to subscribe/unsubscribe:
> >>> http://www.vtk.org/mailman/listinfo/vtkusers
> >>>
> >>
> >
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091026/afcb0b5c/attachment.htm>


More information about the vtkusers mailing list