[vtkusers] Computing curvature of a surface

David.Pont at ForestResearch.co.nz David.Pont at ForestResearch.co.nz
Wed Jul 3 17:56:32 EDT 2002


Jan,  here is a code fragment that might get you started:

  // get point id of closest point in data set
  pid = this->locator->FindClosestPoint( x );
  if( pid != -1 ) {
    this->input->GetPoint( pid, closestPoint );
    // get cells it belongs to
    this->input->GetPointCells( pid, cells );
    // for each cell
    for( cellNum=0; cellNum<cells->GetNumberOfIds(); cellNum++ ) {
      cell = this->input->GetCell( cells->GetId( cellNum ) );

It sounds like you have already identified the nearest point... then the
code determines all the cells that point belongs to and steps through them.
You could then get the points belonging to each cell.
There must be well defined methods to calculate 'curvature' given this set
of connected points? otherwise what about dot product between point
normals, or of all cell edges connected to the central point, with the
central point normal?

   Dave Pont.



                                                                                                                                   
                    Jan Ehrhardt                                                                                                   
                    <ehrhardt at medinf.mu-lue       To:     vtkusers <vtkusers at public.kitware.com>                                   
                    beck.de>                      cc:                                                                              
                    Sent by:                      Subject:     [vtkusers] Computing curvature of a surface                         
                    vtkusers-admin at public.k                                                                                        
                    itware.com                                                                                                     
                                                                                                                                   
                                                                                                                                   
                    03/07/2002 20:11                                                                                               
                                                                                                                                   
                                                                                                                                   




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







More information about the vtkusers mailing list