jaume at tele.ucl.ac.be
Tue May 8 09:39:12 EDT 2001
There is indeed a vtkDelaunay3D, but you will end up with tetrahedral
mesh while you need a surface mesh (made of triangles). I would suggest to
extract the triangles of the outer surface. I am not aware of a vtk filter
doing that, but I'm sure someone else in the vtk community could help you
One you've got your surface mesh, simply use vtkPolyDataNormals in the
vtkPolyDataNormals *PDnormals = vtkPolyDataNormals::New();
vtkNormals *normals = PDnormals->GetPointData()->GetNormals();
// then you can play around with the normals calling the method
// to get normal for vertex with index i
float *n = normals->GetNormal(i);
That's as simple as that! ;-)
On Tue, 8 May 2001, Nikita Kojekine AKA Kitya Karlson wrote:
> Thank you for your answer. I would like to define normal to a point from
> a point cloud as an average normal on triangles, I would get, If I connect by triangles this
> point and it's nearest neighboors. Is there a Delaunay triangulation for 3D in vtk, how can I use
> it and than get this normals?
> > Hi Nikita,
> > How do you define a normal for a point in a point cloud (vtkpoints)?
> > If you create a surface mesh (polydata) out of your point set, you could
> > use vtkPolyDataNormals and get the normals as pointdata attributes.
> > Hope this helps
> > Sylvain
> > On Mon, 7 May 2001, Nikita Kojekine AKA Kitya Karlson wrote:
> > > Hello!
> > > I have a set of points vtkPoints, which represent the surface.
> > > Can I get for each point 2 points instead of it - one on -0.001 on
> > > normal
> > > from the original and one on +0.001? how can i get normal with vtk?
> > > Thank you.
> > >
> > >
> > >
> > > _______________________________________________
> > > This is the private VTK discussion list.
> > > Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> > > Follow this link to subscribe/unsubscribe:
> > > http://public.kitware.com/mailman/listinfo/vtkusers
> > >
More information about the vtkusers