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

Graphics/vtkCurvatures.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCurvatures.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00068 #ifndef __vtkCurvatures_h
00069 #define __vtkCurvatures_h
00070 
00071 #include "vtkPolyDataToPolyDataFilter.h"
00072 
00073 #define VTK_CURVATURE_GAUSS 0
00074 #define VTK_CURVATURE_MEAN  1
00075 
00076 class VTK_GRAPHICS_EXPORT vtkCurvatures : public vtkPolyDataToPolyDataFilter
00077 {
00078 public:
00079   vtkTypeRevisionMacro(vtkCurvatures,vtkPolyDataToPolyDataFilter);
00080   void PrintSelf(ostream& os, vtkIndent indent);
00081 
00083   static vtkCurvatures *New();
00084 
00086 
00089   vtkSetMacro(CurvatureType,int);
00090   vtkGetMacro(CurvatureType,int);
00091   void SetCurvatureTypeToGaussian()
00092   { this->SetCurvatureType(VTK_CURVATURE_GAUSS); }
00093   void SetCurvatureTypeToMean()
00094   { this->SetCurvatureType(VTK_CURVATURE_MEAN); }
00096 
00098 
00100   vtkSetMacro(InvertMeanCurvature,int);
00101   vtkGetMacro(InvertMeanCurvature,int);
00102   vtkBooleanMacro(InvertMeanCurvature,int);
00104 protected:
00105   vtkCurvatures();
00106 
00107   // Usual data generation method
00108   void Execute();
00109 
00112   void GetGaussCurvature();
00113 
00114   // discrete Mean curvature (H) computation,
00115   // cf http://www-ipg.umds.ac.uk/p.batchelor/curvatures/curvatures.html
00116   void GetMeanCurvature();
00117 
00118   // Vars
00119   int CurvatureType;
00120   int InvertMeanCurvature;
00121 
00122 private:
00123   vtkCurvatures(const vtkCurvatures&);  // Not implemented.
00124   void operator=(const vtkCurvatures&);  // Not implemented.
00125 
00126 };
00127 
00128 #endif
00129 
00130