Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
mirtk::SurfaceCurvature Class Reference

#include <SurfaceCurvature.h>

Inheritance diagram for mirtk::SurfaceCurvature:
Inheritance graph
Collaboration diagram for mirtk::SurfaceCurvature:
Collaboration graph

Public Types

enum  TensorIndex
 
enum  Type {
  Minimum = 1, Maximum = 2, Principal = 4, Mean = 8,
  Gauss = 16, Curvedness = 32, Normal = 64, MinimumDirection = 128,
  MaximumDirection = 256, Tensor = 512, InverseTensor = 1024
}
 Enumeration of output curvature measures, can be combined using bitwise OR. More...
 

Public Member Functions

vtkDataArray * GetCurvedness ()
 
vtkDataArray * GetGaussCurvature ()
 
vtkDataArray * GetMaximumCurvature ()
 
vtkDataArray * GetMeanCurvature ()
 
vtkDataArray * GetMinimumCurvature ()
 
vtkDataArray * GetPrincipalCurvatures ()
 
virtual void Initialize ()
 Initialize filter after input and parameters are set.
 
 mirtkGetMacro (CurvatureType, int)
 Get output curvature types.
 
 mirtkGetMacro (TensorAveraging, int)
 Get number of curvature tensor averaging iterations.
 
 mirtkOnOffMacro (VtkCurvatures)
 Enable/disable use of vtkCurvatures filter.
 
 mirtkOnOffMacro (Normalize)
 Enable/disable normalization of mean and Gauss curvature.
 
 mirtkSetMacro (CurvatureType, int)
 Set output curvature types.
 
 mirtkSetMacro (TensorAveraging, int)
 Set number of curvature tensor averaging iterations.
 
SurfaceCurvatureoperator= (const SurfaceCurvature &)
 Assignment operator.
 
 SurfaceCurvature (int type=Scalars)
 Default constructor.
 
 SurfaceCurvature (const SurfaceCurvature &)
 Copy constructor.
 
virtual ~SurfaceCurvature ()
 Destructor.
 
- Public Member Functions inherited from mirtk::MeshFilter
vtkPolyData * GetOutput ()
 Get output surface mesh.
 
 mirtkOnOffMacro (DoublePrecision)
 Enable/disable double precision output.
 
virtual void Run ()
 Run filter.
 
void SetInput (vtkPolyData *)
 Set input surface mesh.
 
void SetInputData (vtkPolyData *)
 Set input surface mesh.
 
void Update ()
 Run filter.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
virtual ParameterList Parameter () const
 Get parameter name/value pairs.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual bool Set (const char *name, const char *value)
 
virtual ~Object ()
 Destructor.
 

Static Public Attributes

static MIRTK_PointSet_EXPORT const char *const CURVEDNESS
 Name of curvedness array.
 
static MIRTK_PointSet_EXPORT const char *const GAUSS
 Name of Gauss curvature array.
 
static MIRTK_PointSet_EXPORT const char *const INVERSE_TENSOR
 Name of inverse curvature tensor array.
 
static MIRTK_PointSet_EXPORT const char *const MAXIMUM
 Name of maximum curvature array.
 
static MIRTK_PointSet_EXPORT const char *const MAXIMUM_DIRECTION
 Name of maximum curvature direction array.
 
static MIRTK_PointSet_EXPORT const char *const MEAN
 Name of mean curvature array.
 
static MIRTK_PointSet_EXPORT const char *const MINIMUM
 Name of minimum curvature array.
 
static MIRTK_PointSet_EXPORT const char *const MINIMUM_DIRECTION
 Name of minimum curvature direction array.
 
static MIRTK_PointSet_EXPORT const char *const NORMALS
 Name of curvature-based normals array.
 
static MIRTK_PointSet_EXPORT const char *const PRINCIPAL
 Name of principal curvatures array.
 
static MIRTK_PointSet_EXPORT const char *const TENSOR
 Name of curvature tensor array.
 

Protected Member Functions

void ComputeCurvedness ()
 Compute curvedness measure.
 
void ComputeGaussCurvature ()
 Compute Gauss curvature.
 
void ComputeMeanCurvature ()
 Compute mean curvature.
 
void ComputeMinMaxCurvature (bool, bool)
 Compute minimum and/or maximum curvature from mean and Gauss curvature.
 
void ComputePrincipalCurvatures ()
 Compute principal curvatures from mean and Gauss curvature.
 
void ComputeTensorField ()
 Compute curvature tensors.
 
void CopyAttributes (const SurfaceCurvature &)
 Copy attributes of this class from another instance.
 
void DecomposeTensorField ()
 Compute eigenvalues (and eigenvectors) of curvature tensors.
 
virtual void Execute ()
 Execute filter.
 
virtual void Finalize ()
 Finalize filter execution.
 
 mirtkPublicAttributeMacro (int, CurvatureType)
 Curvature type(s) to compute.
 
 mirtkPublicAttributeMacro (bool, VtkCurvatures)
 Whether to use vtkCurvatures filter instead.
 
 mirtkPublicAttributeMacro (int, TensorAveraging)
 Number of tensor averaging iterations.
 
 mirtkPublicAttributeMacro (bool, Normalize)
 Whether to normalize curvature assuming a spherical shape.
 
 mirtkReadOnlyAttributeMacro (double, Volume)
 
 mirtkReadOnlyAttributeMacro (double, Radius)
 
- Protected Member Functions inherited from mirtk::SurfaceFilter
SurfaceFilteroperator= (const SurfaceFilter &)
 Assignment operator.
 
 SurfaceFilter ()
 Default constructor.
 
 SurfaceFilter (const SurfaceFilter &)
 Copy constructor.
 
virtual ~SurfaceFilter ()
 Destructor.
 
- Protected Member Functions inherited from mirtk::MeshFilter
virtual void InitializeEdgeTable ()
 To be called by subclass in Initialize when _EdgeTable is needed.
 
 MeshFilter ()
 Default constructor.
 
 MeshFilter (const MeshFilter &)
 Copy constructor.
 
vtkSmartPointer< vtkDataArray > NewArray (const char *name, vtkIdType n, int c, int type=VTK_VOID) const
 
vtkSmartPointer< vtkDataArray > NewArray (const char *name, int c=1, int type=VTK_VOID) const
 
vtkSmartPointer< vtkDataArray > NewCellArray (const char *name, int c=1, int type=VTK_VOID) const
 
vtkSmartPointer< vtkDataArray > NewPointArray (const char *name, int c=1, int type=VTK_VOID) const
 
MeshFilteroperator= (const MeshFilter &)
 Assignment operator.
 
virtual ~MeshFilter ()
 Destructor.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 

Additional Inherited Members

- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 
- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 

Detailed Description

Compute curvature at each point of a surface mesh

This curvature computation is based on a robust estimation of the 3D curvature tensor field as implemented in Matlab by Gabriel Peyre:

http://uk.mathworks.com/matlabcentral/fileexchange/5355-toolbox-graph/content/toolbox_graph/compute_curvature.m

The algorithm is detailed in David Cohen-Steiner and Jean-Marie Morvan. Restricted Delaunay triangulations and normal cycle. In Proc. 19th Annual ACM Symposium on Computational Geometry, pages 237-246, 2003. and also in Pierre Alliez, David Cohen-Steiner, Olivier Devillers, Bruno LeŽvy, and Mathieu Desbrun. Anisotropic Polygonal Remeshing. ACM Transactions on Graphics, 2003. Note: SIGGRAPH '2003 Conference Proceedings

Alternatively, the vtkCurvatures filter can be used to compute mean curvature, Gauss curvature, and minimum and maximum curvature. To enable the use of this VTK filter, call VtkCurvaturesOn(). This option is ignored when the curvature tensor or principle directions are requested. If multiple curvature types supported by vtkCurvatures are requested, the minimum and maximum curvatures are computed by this filter from the mean and Gauss curvature values obtained by vtkCurvatures, to avoid the duplicate computation of these curvature values when using the vtkCurvatures filter. This computation is identical to vtkCurvatures::GetMinimumCurvature and vtkCurvatures::GetMaximumCurvature.

Definition at line 61 of file SurfaceCurvature.h.

Member Enumeration Documentation

§ TensorIndex

Component indices of tensor output array

This order is compatible with ParaView, which automatically labels the entries in this order.

Definition at line 92 of file SurfaceCurvature.h.

§ Type

Enumeration of output curvature measures, can be combined using bitwise OR.

Enumerator
Minimum 

Minimum principal curvature, k_min.

Maximum 

Maximum principal curvature, k_max.

Principal 

Both principal curvatures in single array.

Mean 

Mean curvature, (k_min + k_max)/2.

Gauss 

Gauss curvature, k_min * k_max.

Curvedness 

Curvedness, i.e., sqrt((k_min^2 + k_max^2) / 2)

Normal 

Point normal computed from curvature tensor.

MinimumDirection 

Direction of minimum curvature.

MaximumDirection 

Direction of maximum curvature.

Tensor 

6 entries of symmetric 3x3 curvature tensor

InverseTensor 

6 entries of inverse of symmetric 3x3 curvature tensor

Definition at line 71 of file SurfaceCurvature.h.

Member Function Documentation

§ GetCurvedness()

vtkDataArray* mirtk::SurfaceCurvature::GetCurvedness ( )

Get/compute curvedness

If Run was executed and the curvedness was included in the requested output curvature types, this function just returns the respective point data array. Otherwise, Initialize must be called first and this function will compute the mean, Gauss, minimum, and maximum curvature using the vtkCurvatures filter and then compute the curvedness from the minimum and maximum curvature.

Note
Smoothing is not performed unless Run is executed.

§ GetGaussCurvature()

vtkDataArray* mirtk::SurfaceCurvature::GetGaussCurvature ( )

Get/compute Gauss curvature

If Run was executed and the Gauss curvature was included in the requested output curvature types, this function just returns the respective point data array. Otherwise, Initialize must be called first and this function will compute the Gauss curvature only using the vtkCurvatures filter.

Note
Smoothing is not performed unless Run is executed.

§ GetMaximumCurvature()

vtkDataArray* mirtk::SurfaceCurvature::GetMaximumCurvature ( )

Get/compute maximum curvature

If Run was executed and the maximum curvature was included in the requested output curvature types, this function just returns the respective point data array. Otherwise, Initialize must be called first and this function will compute the mean, Gauss, and maximum curvatures using the vtkCurvatures filter.

Note
Smoothing is not performed unless Run is executed.

§ GetMeanCurvature()

vtkDataArray* mirtk::SurfaceCurvature::GetMeanCurvature ( )

Get/compute mean curvature

If Run was executed and the mean curvature was included in the requested output curvature types, this function just returns the respective point data array. Otherwise, Initialize must be called first and this function will compute the mean curvature only using the vtkCurvatures filter.

Note
Smoothing is not performed unless Run is executed.

§ GetMinimumCurvature()

vtkDataArray* mirtk::SurfaceCurvature::GetMinimumCurvature ( )

Get/compute minimum curvature

If Run was executed and the minimum curvature was included in the requested output curvature types, this function just returns the respective point data array. Otherwise, Initialize must be called first and this function will compute the mean, Gauss, and minimum curvatures using the vtkCurvatures filter.

Note
Smoothing is not performed unless Run is executed.

§ GetPrincipalCurvatures()

vtkDataArray* mirtk::SurfaceCurvature::GetPrincipalCurvatures ( )

Get/compute principal curvatures

If Run was executed and the principle curvatures were included in the requested output curvature types, this function just returns the respective point data array. Otherwise, Initialize must be called first and this function will compute the mean, Gauss, and principle curvatures using the vtkCurvatures filter.

When the minimum and maximum curvatures were computed before and stored in separate output point data arrays, this function only allocates a new output point data array to store both principal curvatures.

Note
Smoothing is not performed unless Run is executed.

§ mirtkReadOnlyAttributeMacro() [1/2]

mirtk::SurfaceCurvature::mirtkReadOnlyAttributeMacro ( double  ,
Volume   
)
protected

Volume of convex hull

Note
Compute only if NormalizeOn.

§ mirtkReadOnlyAttributeMacro() [2/2]

mirtk::SurfaceCurvature::mirtkReadOnlyAttributeMacro ( double  ,
Radius   
)
protected

Radius of sphere have the same volume as the convex hull

Note
Compute only if NormalizeOn.

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