SV: [vtkusers] using GetNumberOfTriangles()
Tron Darvann
trd at odont.ku.dk
Sun Nov 12 10:20:10 EST 2006
This code will get the number of cells.
If you only have triangles, it will be the number of triangles.
// Read the surface (VTK type in this example)
vtkPolyDataReader *surf = vtkPolyDataReader :: New();
surf -> SetFileName(filename);
surf -> Update();
// Put surface points in Points
vtkPoints Points = Surf -> GetPoints();
// Get the number of cells, e.g. triangles
ncells = Points -> GetNumberOfCells();
Tron Darvann
Research Engineer, PhD, 3D-Laboratory
Tel: (+45) 35 32 67 58 (lab) / (+45) 28 20 03 12 (mobile)
E-mail: trd at odont.ku.dk
Skype: tron.darvann
Fax: (+45) 35 32 65 05
Mailing and Visiting Address:
3D-Lab, School of Dentistry
University of Copenhagen
Nørre Alle 20
DK-2200 Copenhagen N
Denmark
________________________________
Fra: vtkusers-bounces+trd=odont.ku.dk at vtk.org på vegne af mam06bhv at studserv.uni-leipzig.de
Sendt: lø 11-11-2006 20:58
Til: vtkusers at vtk.org
Emne: [vtkusers] using GetNumberOfTriangles()
Hello,
does someone know how to use the function GetNumberOfTriangles() to get the
numbers of triangles for a 3D model?
thanks
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061112/137b2a59/attachment.htm>
More information about the vtkusers
mailing list