[vtkusers] vtkPolyData problem

Cory Quammen cquammen at cs.unc.edu
Wed Dec 10 20:23:59 EST 2008


I haven't tested this, but I think it should do what you want.

for (int i = 0; i < surface.GetNumberOfCells(); i++) {
   vtkCell cell = surface.GetCell(i);

   // Might need to check cell type here with cell.GetCellType();
   for (int j = 0; j < cell.GetNumberOfPoints(); j++) {
      vtkIdType id = cell.GetPointId(j);
      double pt[] = surface.GetPoint(id);
      ...
   }
}

Cory

On Wed, Dec 10, 2008 at 6:55 PM,  <saurisaran at aol.com> wrote:
> Hi all,
> I use vtk for my java project. i need the pointlists of the polygons from a
> vtkpolydata.
> Yes i have searched the internet for this but the problem is that some
> methods named in
> some documentations are missing in the java wrapper classes.
> when i try:
> //surface is the vtkpolydata
> vtkCellArray polys = surface.GetOutput().GetPolys();
> there is no method to get the points from the polygons. Is there another way
> to get these
> points. I hope you can help me because it is very important.
> Thanks Arne
> ________________________________
> AOL eMail auf Ihrem Handy!Ab sofort können Sie auch unterwegs Ihre AOL email
> abrufen. Registrieren Sie sich jetzt kostenlos.
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



-- 
Cory Quammen
Center for Computer Integrated Systems for Microscopy and Manipulation (CISMM)
Department of Computer Science
University of North Carolina at Chapel Hill
http://www.cs.unc.edu/~cquammen



More information about the vtkusers mailing list