[vtkusers] Computing curvature of a surface
Andrew Maclean
a.maclean at acfr.usyd.edu.au
Thu Jul 4 22:35:50 EDT 2002
Funny thing! Just this morning, I sat down to modify the code for VTK4.x!
I have modified it and added in a couple of extra functions, so Phillip, I
will send the code to you with some comments.
This may give you a head start!
I won't release my modifications, because I would rather just see one version.
So as I said above, I am sending what I have done to you (Philip) with some
comments. I have tested it and it seems to work OK. Hopefully you will be able
to easily incorporate your principal curvature work. Looking forward to seeing
the final result on your web site.
Regards
Andrew
___________________________________________
Andrew J. P. Maclean
Postal:
Australian Centre for Field Robotics
The Rose Street Building J04
The University of Sydney 2006 NSW
AUSTRALIA
Room: 106
Phone: +61 2 9351 3283
Fax: +61 2 9351 7474
http://www.acfr.usyd.edu.au/
___________________________________________
Quoting "Philipp.Batchelor" <philipp.batchelor at kcl.ac.uk>:
> Yes,
>
> it's a funny coincidence that I hadn't been touched my curvature
> code for a long time, but have been working this week on the changes to
> make it compatible
> with the way vtk4.x handles Scalars. (Not without struggle, as my post
> on Monday shows). Also, I'm trying to add a new method to compute curvatures,
> based
> on principal curvatures, which also computes a curvature tensor, but this is
> untested yet.
> Note that the filter was written quite a while ago, when I was still
> learning
> vtk, and is certainly not up the vtk coding standards.
>
> In short: Gauss curvature is the angle defect at a vertex.
> Mean curvature, edge length x dihedral angle at edge.
>
> You can have a look at the main loops is the method GetK() and GetH()
> of the filter, and copy-paste that if it is more convenient.
>
>
> ----------------------------------
> Dr Philippe Batchelor
> King's College London
> London SE1 9RT
>
> phone: +44 207 955 4223
> fax: +44 207 955 4532
> ----------------------------------
>
> "Andrew J. P. Maclean" wrote:
> >
> > It has all been done for you!
> >
> > Look at:
> > http://www-ipg.umds.ac.uk/p.batchelor/curvatures/curvatures.html
> >
> > Philipp Batchelor also supplies some vtk Classes to do it:
> > His comments are:
> > " This a VTK C++ class, a subclass of vtkPolyDataToPolyDataFilter, as
> > input it takes a triangulated PolyData, and the output is the same
> > PolyData, with the desired curvatures a scalars. This is chosen by the
> > method vtkCurvatures::SetCurvatureType(i), with i = 0 for , i = 1 for
> > for . i = 2 should give both, but I haven't used it very much in that
> > way. Note thata as the computation of angles uses the acos, asin, and
> > atan2 functions, the curvatures are double.
> > Warning As mentioned above: the mean curvature requires an oriented
> > surface, so typically, the surface should have gone through a
> > vtkTriangleFilter and vtkPolyDataNormals. This is quite restrictive, in
> > particular none of the definitions really requires triangles, I just did
> > it for convenience. If you'd want to suggest modifications, don't
> > hesitate to email me.
> >
> > I use the class in a local library, so that the curvature class can be
> > used in Tcl. I normally use VTK 3.1, on a Sun Ultra-30, with the Sun
> > compiler.
> >
> > As they are relatively small files, they are provided directly: Download
> > vtkCurvatures.h and DownloadvtkCurvatures.cxx "
> >
> > Andrew
> >
> > ___________________________________________
> > Andrew J. P. Maclean
> > Postal:
> > Australian Centre for Field Robotics
> > The Rose Street Building J04
> > The University of Sydney 2006 NSW
> > AUSTRALIA
> >
> > Room: 106
> > Phone: +61 2 9351 3283
> > Fax: +61 2 9351 7474
> > http://www.acfr.usyd.edu.au/
> >
> > ___________________________________________
> >
> > -----Original Message-----
> > From: vtkusers-admin at public.kitware.com
> > [mailto:vtkusers-admin at public.kitware.com] On Behalf Of Jan Ehrhardt
> > Sent: Wednesday, 3 July 2002 18:11
> > To: vtkusers
> > Subject: [vtkusers] Computing curvature of a surface
> >
> > hi folks,
> >
> > I have the following problem: I want to register two polygonal surfaces
> > using nonlinear transformations.
> > I have implemented an algorithm similar to andresens and nielsen
> > "geometry constrained diffusion".
> > This works like ICP but for nonlinear transformations.
> > Actually, I match the nearest points on the two surfaces.
> > The idea is not only to use the spatial distance but also the normal
> > vektors and curvature of the points
> > to identify corresponding points.
> > The normals caan I compute using vtkPolyDataNormals, but how to compute
> > the curvature of the surface points?
> > Concrete:
> > I have an polydata surface (no associated image or scalar values!).
> > How can I compute the curvature for each point (triangle vertex) from
> > the polydata ?
> > Curvature means min and max curvature and /or gaussian curvature.
> >
> > Regards and many thanks for ANY help,
> >
> > Jan
> >
> > _______________________________________________
> > 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
>
> --
>
-------------------------------------------------
This mail sent through IMP: www-mail.usyd.edu.au
More information about the vtkusers
mailing list