VTK
dox/Filters/General/vtkCurvatures.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkCurvatures.h
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 =========================================================================*/
00065 #ifndef __vtkCurvatures_h
00066 #define __vtkCurvatures_h
00067 
00068 #include "vtkFiltersGeneralModule.h" // For export macro
00069 #include "vtkPolyDataAlgorithm.h"
00070 
00071 #define VTK_CURVATURE_GAUSS 0
00072 #define VTK_CURVATURE_MEAN  1
00073 #define VTK_CURVATURE_MAXIMUM 2
00074 #define VTK_CURVATURE_MINIMUM 3
00075 
00076 class VTKFILTERSGENERAL_EXPORT vtkCurvatures : public vtkPolyDataAlgorithm
00077 {
00078 public:
00079   vtkTypeMacro(vtkCurvatures,vtkPolyDataAlgorithm);
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); }
00095   void SetCurvatureTypeToMaximum()
00096   { this->SetCurvatureType(VTK_CURVATURE_MAXIMUM); }
00097   void SetCurvatureTypeToMinimum()
00098   { this->SetCurvatureType(VTK_CURVATURE_MINIMUM); }
00100 
00102 
00104   vtkSetMacro(InvertMeanCurvature,int);
00105   vtkGetMacro(InvertMeanCurvature,int);
00106   vtkBooleanMacro(InvertMeanCurvature,int);
00107 protected:
00108   vtkCurvatures();
00110 
00111   // Usual data generation method
00112   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00113 
00116   void GetGaussCurvature(vtkPolyData *output);
00117 
00118   // discrete Mean curvature (H) computation,
00119   // cf http://www-ipg.umds.ac.uk/p.batchelor/curvatures/curvatures.html
00120   void GetMeanCurvature(vtkPolyData *output);
00121 
00123   void GetMaximumCurvature(vtkPolyData *input, vtkPolyData *output);
00124 
00126   void GetMinimumCurvature(vtkPolyData *input, vtkPolyData *output);
00127 
00128 
00129   // Vars
00130   int CurvatureType;
00131   int InvertMeanCurvature;
00132 
00133 private:
00134   vtkCurvatures(const vtkCurvatures&);  // Not implemented.
00135   void operator=(const vtkCurvatures&);  // Not implemented.
00136 
00137 };
00138 
00139 #endif
00140 
00141