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 =========================================================================*/
00058 #ifndef __vtkCurvatures_h
00059 #define __vtkCurvatures_h
00060 
00061 #include "vtkPolyDataToPolyDataFilter.h"
00062 
00063 #define VTK_CURVATURE_GAUSS 0
00064 #define VTK_CURVATURE_MEAN  1
00065 
00066 class VTK_GRAPHICS_EXPORT vtkCurvatures : public vtkPolyDataToPolyDataFilter
00067 {
00068 public:
00069   vtkTypeRevisionMacro(vtkCurvatures,vtkPolyDataToPolyDataFilter);
00070   void PrintSelf(ostream& os, vtkIndent indent);
00071 
00073   static vtkCurvatures *New();
00074 
00076 
00079   vtkSetMacro(CurvatureType,int);
00080   vtkGetMacro(CurvatureType,int);
00081   void SetCurvatureTypeToGaussian()
00082   { this->SetCurvatureType(VTK_CURVATURE_GAUSS); }
00083   void SetCurvatureTypeToMean()
00084   { this->SetCurvatureType(VTK_CURVATURE_MEAN); }
00086 
00088 
00090   vtkSetMacro(InvertMeanCurvature,int);
00091   vtkGetMacro(InvertMeanCurvature,int);
00092   vtkBooleanMacro(InvertMeanCurvature,int);
00094 protected:
00095   vtkCurvatures();
00096 
00097   // Usual data generation method
00098   void Execute();
00099 
00102   void GetGaussCurvature();
00103 
00104   // discrete Mean curvature (H) computation,
00105   // cf http://www-ipg.umds.ac.uk/p.batchelor/curvatures/curvatures.html
00106   void GetMeanCurvature();
00107 
00108   // Vars
00109   int CurvatureType;
00110   int InvertMeanCurvature;
00111 
00112 private:
00113   vtkCurvatures(const vtkCurvatures&);  // Not implemented.
00114   void operator=(const vtkCurvatures&);  // Not implemented.
00115 
00116 };
00117 
00118 #endif
00119 
00120