[vtkusers] Differences in vtkPolyData for use with vtkCurvatures

Olliebrown seth.berrier at gmail.com
Wed Feb 9 13:25:17 EST 2011


Greetings!

I'm very new with VTK and am attempting something pretty simple at first.  I
want to compute the gaussian curvature at every vertex on a mesh.  I would
like to do this with mesh data from OBJ files.

I'm finding, vtkCurvatures works with PLY input but not with my OBJ input
(at least, the way I'm doing it).  I started with the code 
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/Curvatures here  and
swapped in vtkOBJReader and vtkPLYReader for the vtkXMLPolyDataReader.

I dug into the vtkPolyData objects that are returned by GetOutput() from
vtkOBJReader and vtkPLYReader and they have some differences.

For my obj's:
GetPointData()->GetNumberOfTuples() is non zero (and matches the # of
vertices).
GetPointData()->GetNormals()->GetNumberOfTuples() is also correct.

For 'bunny.ply' in the VTKData package:
GetPointData()->GetNumberOfTuples() is zero

Despite the point data being apparent empty, the PLY works and the OBJ
doesn't.  Any thoughts/help on why these are different (perhaps the .ply
data is in some other part of the vtkPolyData object) and how I can get
vtkCurvatures to work with the output of vtkOBJReader?

Thanks!
Seth

-- 
View this message in context: http://vtk.1045678.n5.nabble.com/Differences-in-vtkPolyData-for-use-with-vtkCurvatures-tp3378043p3378043.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list