VMTK
vtkvmtkRBFInterpolation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: VMTK
4 Module: $RCSfile: vtkvmtkRBFInterpolation.h,v $
5 Language: C++
6 
7  Copyright (c) Luca Antiga, David Steinman. All rights reserved.
8  See LICENSE file for details.
9 
10  Portions of this code are covered under the VTK copyright.
11  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
12  for details.
13 
14  This software is distributed WITHOUT ANY WARRANTY; without even
15  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16  PURPOSE. See the above copyright notices for more information.
17 
18 =========================================================================*/
28 #ifndef __vtkvmtkRBFInterpolation_h
29 #define __vtkvmtkRBFInterpolation_h
30 
31 #include "vtkImplicitFunction.h"
32 #include "vtkPolyData.h"
33 #include "vtkDoubleArray.h"
34 #include "vtkvmtkWin32Header.h"
35 #include "vtkVersion.h"
36 
37 class VTK_VMTK_MISC_EXPORT vtkvmtkRBFInterpolation : public vtkImplicitFunction
38 {
39  public:
40  vtkTypeMacro(vtkvmtkRBFInterpolation,vtkImplicitFunction);
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42 
43  static vtkvmtkRBFInterpolation *New();
44 
46 
47  double EvaluateFunction(double x[3]) VTK_OVERRIDE;
48  double EvaluateFunction(double x, double y, double z) VTK_OVERRIDE
49  {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
51 
53  void EvaluateGradient(double x[3], double n[3]) VTK_OVERRIDE;
54 
55  void ComputeCoefficients();
56 
58 
59  vtkSetObjectMacro(Source,vtkPolyData);
60  vtkGetObjectMacro(Source,vtkPolyData);
62 
63  vtkSetMacro(RBFType,int);
64  vtkGetMacro(RBFType,int);
66  { this->SetRBFType(THIN_PLATE_SPLINE); }
68  { this->SetRBFType(BIHARMONIC); }
70  { this->SetRBFType(TRIHARMONIC); }
71 
72 //BTX
73  enum
74  {
77  TRIHARMONIC
78  };
79 //ETX
80 
81 #ifdef VTK_HAS_MTIME_TYPE
82  vtkMTimeType GetMTime() VTK_OVERRIDE;
83 #else
84  unsigned long GetMTime();
85 #endif
86 
87  protected:
90 
91  double EvaluateRBF(double c[3], double x[3]);
92 
93  vtkPolyData* Source;
94  int RBFType;
95 
96  vtkDoubleArray* Coefficients;
98 
99  private:
100  vtkvmtkRBFInterpolation(const vtkvmtkRBFInterpolation&); // Not implemented.
101  void operator=(const vtkvmtkRBFInterpolation&); // Not implemented.
102 };
103 
104 #endif
105 
106 
double EvaluateFunction(double x, double y, double z) VTK_OVERRIDE
Implicit function which when given a set of disjoined points and a radial basis shape type will evalu...