Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkCurvatures.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCurvatures.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00076 #ifndef __vtkCurvatures_h
00077 #define __vtkCurvatures_h
00078 
00079 #include "vtkPolyDataToPolyDataFilter.h"
00080 
00081 #define VTK_CURVATURE_GAUSS 0
00082 #define VTK_CURVATURE_MEAN  1
00083 #define VTK_CURVATURE_MAXIMUM 2
00084 #define VTK_CURVATURE_MINIMUM 3
00085 
00086 class VTK_GRAPHICS_EXPORT vtkCurvatures : public vtkPolyDataToPolyDataFilter
00087 {
00088 public:
00089   vtkTypeRevisionMacro(vtkCurvatures,vtkPolyDataToPolyDataFilter);
00090   void PrintSelf(ostream& os, vtkIndent indent);
00091 
00093   static vtkCurvatures *New();
00094 
00096 
00099   vtkSetMacro(CurvatureType,int);
00100   vtkGetMacro(CurvatureType,int);
00101   void SetCurvatureTypeToGaussian()
00102   { this->SetCurvatureType(VTK_CURVATURE_GAUSS); }
00103   void SetCurvatureTypeToMean()
00104   { this->SetCurvatureType(VTK_CURVATURE_MEAN); }
00105   void SetCurvatureTypeToMaximum()
00106   { this->SetCurvatureType(VTK_CURVATURE_MAXIMUM); }
00107   void SetCurvatureTypeToMinimum()
00108   { this->SetCurvatureType(VTK_CURVATURE_MINIMUM); }
00110 
00112 
00114   vtkSetMacro(InvertMeanCurvature,int);
00115   vtkGetMacro(InvertMeanCurvature,int);
00116   vtkBooleanMacro(InvertMeanCurvature,int);
00118 protected:
00119   vtkCurvatures();
00120 
00121   // Usual data generation method
00122   void Execute();
00123 
00126   void GetGaussCurvature();
00127 
00128   // discrete Mean curvature (H) computation,
00129   // cf http://www-ipg.umds.ac.uk/p.batchelor/curvatures/curvatures.html
00130   void GetMeanCurvature();
00131   
00133   void GetMaximumCurvature();
00134   
00136   void GetMinimumCurvature();
00137   
00138 
00139   // Vars
00140   int CurvatureType;
00141   int InvertMeanCurvature;
00142 
00143 private:
00144   vtkCurvatures(const vtkCurvatures&);  // Not implemented.
00145   void operator=(const vtkCurvatures&);  // Not implemented.
00146 
00147 };
00148 
00149 #endif
00150 
00151