VTK
vtkCurvatures.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCurvatures.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
65 #ifndef __vtkCurvatures_h
66 #define __vtkCurvatures_h
67 
68 #include "vtkPolyDataAlgorithm.h"
69 
70 #define VTK_CURVATURE_GAUSS 0
71 #define VTK_CURVATURE_MEAN 1
72 #define VTK_CURVATURE_MAXIMUM 2
73 #define VTK_CURVATURE_MINIMUM 3
74 
76 {
77 public:
79  void PrintSelf(ostream& os, vtkIndent indent);
80 
82  static vtkCurvatures *New();
83 
85 
88  vtkSetMacro(CurvatureType,int);
89  vtkGetMacro(CurvatureType,int);
91  { this->SetCurvatureType(VTK_CURVATURE_GAUSS); }
93  { this->SetCurvatureType(VTK_CURVATURE_MEAN); }
95  { this->SetCurvatureType(VTK_CURVATURE_MAXIMUM); }
97  { this->SetCurvatureType(VTK_CURVATURE_MINIMUM); }
99 
101 
103  vtkSetMacro(InvertMeanCurvature,int);
104  vtkGetMacro(InvertMeanCurvature,int);
105  vtkBooleanMacro(InvertMeanCurvature,int);
106 protected:
107  vtkCurvatures();
109 
110  // Usual data generation method
112 
115  void GetGaussCurvature(vtkPolyData *output);
116 
117  // discrete Mean curvature (H) computation,
118  // cf http://www-ipg.umds.ac.uk/p.batchelor/curvatures/curvatures.html
119  void GetMeanCurvature(vtkPolyData *output);
120 
122  void GetMaximumCurvature(vtkPolyData *input, vtkPolyData *output);
123 
125  void GetMinimumCurvature(vtkPolyData *input, vtkPolyData *output);
126 
127 
128  // Vars
131 
132 private:
133  vtkCurvatures(const vtkCurvatures&); // Not implemented.
134  void operator=(const vtkCurvatures&); // Not implemented.
135 
136 };
137 
138 #endif
139 
140