VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkCurvatures Class Reference

compute curvatures (Gauss and mean) of a Polydata object More...

#include <vtkCurvatures.h>

Inheritance diagram for vtkCurvatures:
Inheritance graph
[legend]
Collaboration diagram for vtkCurvatures:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkPolyDataAlgorithm Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkCurvaturesNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetCurvatureType (int)
virtual int GetCurvatureType ()
void SetCurvatureTypeToGaussian ()
void SetCurvatureTypeToMean ()
void SetCurvatureTypeToMaximum ()
void SetCurvatureTypeToMinimum ()

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkCurvaturesSafeDownCast (vtkObjectBase *o)
static vtkCurvaturesNew ()

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
void GetGaussCurvature (vtkPolyData *output)
void GetMeanCurvature (vtkPolyData *output)
void GetMaximumCurvature (vtkPolyData *input, vtkPolyData *output)
void GetMinimumCurvature (vtkPolyData *input, vtkPolyData *output)

Protected Attributes

int CurvatureType
int InvertMeanCurvature
virtual void SetInvertMeanCurvature (int)
virtual int GetInvertMeanCurvature ()
virtual void InvertMeanCurvatureOn ()
virtual void InvertMeanCurvatureOff ()
 vtkCurvatures ()

Detailed Description

compute curvatures (Gauss and mean) of a Polydata object

vtkCurvatures takes a polydata input and computes the curvature of the mesh at each point. Four possible methods of computation are available :

Gauss Curvature discrete Gauss curvature (K) computation, $K(vertex v) = 2*PI-\sum_{facet neighbs f of v} (angle_f at v)$ The contribution of every facet is for the moment weighted by $Area(facet)/3$ The units of Gaussian Curvature are $[1/m^2]$

Mean Curvature $H(vertex v) = average over edges neighbs e of H(e)$ $H(edge e) = length(e)*dihedral_angle(e)$ NB: dihedral_angle is the ORIENTED angle between -PI and PI, this means that the surface is assumed to be orientable the computation creates the orientation The units of Mean Curvature are [1/m]

Maximum ( $k_max$) and Minimum ( $k_min$) Principal Curvatures $k_max = H + sqrt(H^2 - K)$ $k_min = H - sqrt(H^2 - K)$ Excepting spherical and planar surfaces which have equal principal curvatures, the curvature at a point on a surface varies with the direction one "sets off" from the point. For all directions, the curvature will pass through two extrema: a minimum ( $k_min$) and a maximum ( $k_max$) which occur at mutually orthogonal directions to each other.

NB. The sign of the Gauss curvature is a geometric ivariant, it should be +ve when the surface looks like a sphere, -ve when it looks like a saddle, however, the sign of the Mean curvature is not, it depends on the convention for normals - This code assumes that normals point outwards (ie from the surface of a sphere outwards). If a given mesh produces curvatures of opposite senses then the flag InvertMeanCurvature can be set and the Curvature reported by the Mean calculation will be inverted.

Thanks:
Philip Batchelor phili.nosp@m.pp.b.nosp@m.atche.nosp@m.lor@.nosp@m.kcl.a.nosp@m.c.uk for creating and contributing the class and Andrew Maclean a.mac.nosp@m.lean.nosp@m.@acfr.nosp@m..usy.nosp@m.d.edu.nosp@m..au for cleanups and fixes. Thanks also to Goodwin Lawlor for contributing patch to calculate principal curvatures
Tests:
vtkCurvatures (Tests)

Definition at line 76 of file vtkCurvatures.h.


Member Typedef Documentation

Reimplemented from vtkPolyDataAlgorithm.

Definition at line 79 of file vtkCurvatures.h.


Constructor & Destructor Documentation

Set/Get the flag which inverts the mean curvature calculation for meshes with inward pointing normals (default false)


Member Function Documentation

static int vtkCurvatures::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataAlgorithm.

virtual int vtkCurvatures::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataAlgorithm.

Reimplemented from vtkPolyDataAlgorithm.

virtual vtkObjectBase* vtkCurvatures::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkPolyDataAlgorithm.

Reimplemented from vtkPolyDataAlgorithm.

void vtkCurvatures::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkPolyDataAlgorithm.

static vtkCurvatures* vtkCurvatures::New ( ) [static]

Construct with curvature type set to Gauss

Reimplemented from vtkPolyDataAlgorithm.

virtual void vtkCurvatures::SetCurvatureType ( int  ) [virtual]

Set/Get Curvature type VTK_CURVATURE_GAUSS: Gaussian curvature, stored as DataArray "Gauss_Curvature" VTK_CURVATURE_MEAN : Mean curvature, stored as DataArray "Mean_Curvature"

virtual int vtkCurvatures::GetCurvatureType ( ) [virtual]

Set/Get Curvature type VTK_CURVATURE_GAUSS: Gaussian curvature, stored as DataArray "Gauss_Curvature" VTK_CURVATURE_MEAN : Mean curvature, stored as DataArray "Mean_Curvature"

Set/Get Curvature type VTK_CURVATURE_GAUSS: Gaussian curvature, stored as DataArray "Gauss_Curvature" VTK_CURVATURE_MEAN : Mean curvature, stored as DataArray "Mean_Curvature"

Definition at line 91 of file vtkCurvatures.h.

Set/Get Curvature type VTK_CURVATURE_GAUSS: Gaussian curvature, stored as DataArray "Gauss_Curvature" VTK_CURVATURE_MEAN : Mean curvature, stored as DataArray "Mean_Curvature"

Definition at line 93 of file vtkCurvatures.h.

Set/Get Curvature type VTK_CURVATURE_GAUSS: Gaussian curvature, stored as DataArray "Gauss_Curvature" VTK_CURVATURE_MEAN : Mean curvature, stored as DataArray "Mean_Curvature"

Definition at line 95 of file vtkCurvatures.h.

Set/Get Curvature type VTK_CURVATURE_GAUSS: Gaussian curvature, stored as DataArray "Gauss_Curvature" VTK_CURVATURE_MEAN : Mean curvature, stored as DataArray "Mean_Curvature"

Definition at line 97 of file vtkCurvatures.h.

virtual void vtkCurvatures::SetInvertMeanCurvature ( int  ) [virtual]

Set/Get the flag which inverts the mean curvature calculation for meshes with inward pointing normals (default false)

Set/Get the flag which inverts the mean curvature calculation for meshes with inward pointing normals (default false)

virtual void vtkCurvatures::InvertMeanCurvatureOn ( ) [virtual]

Set/Get the flag which inverts the mean curvature calculation for meshes with inward pointing normals (default false)

virtual void vtkCurvatures::InvertMeanCurvatureOff ( ) [virtual]

Set/Get the flag which inverts the mean curvature calculation for meshes with inward pointing normals (default false)

int vtkCurvatures::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

This is called by the superclass. This is the method you should override.

Reimplemented from vtkPolyDataAlgorithm.

void vtkCurvatures::GetGaussCurvature ( vtkPolyData output) [protected]

discrete Gauss curvature (K) computation, cf http://www-ipg.umds.ac.uk/p.batchelor/curvatures/curvatures.html

void vtkCurvatures::GetMeanCurvature ( vtkPolyData output) [protected]
void vtkCurvatures::GetMaximumCurvature ( vtkPolyData input,
vtkPolyData output 
) [protected]

Maximum principal curvature $k_max = H + sqrt(H^2 -K)$

void vtkCurvatures::GetMinimumCurvature ( vtkPolyData input,
vtkPolyData output 
) [protected]

Minimum principal curvature $k_min = H - sqrt(H^2 -K)$


Member Data Documentation

Definition at line 130 of file vtkCurvatures.h.

Definition at line 131 of file vtkCurvatures.h.


The documentation for this class was generated from the following file: