VTK
vtkGeneralizedKernel.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGeneralizedKernel.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
63 #ifndef vtkGeneralizedKernel_h
64 #define vtkGeneralizedKernel_h
65 
66 #include "vtkFiltersPointsModule.h" // For export macro
67 #include "vtkInterpolationKernel.h"
68 
69 
70 class VTKFILTERSPOINTS_EXPORT vtkGeneralizedKernel : public vtkInterpolationKernel
71 {
72 public:
74 
78  void PrintSelf(ostream& os, vtkIndent indent);
80 
91  virtual vtkIdType ComputeBasis(double x[3], vtkIdList *pIds, vtkIdType ptId=0);
92 
107  virtual vtkIdType ComputeWeights(double x[3], vtkIdList *pIds,
108  vtkDoubleArray *prob, vtkDoubleArray *weights) = 0;
109 
119  virtual vtkIdType ComputeWeights(double x[3], vtkIdList *pIds, vtkDoubleArray *weights)
120  {
121  return this->ComputeWeights(x,pIds,NULL,weights);
122  }
123 
131  {
132  RADIUS=0,
133  N_CLOSEST=1
134  };
135 
137 
145  vtkSetMacro(KernelFootprint,int);
146  vtkGetMacro(KernelFootprint,int);
148  { this->SetKernelFootprint(RADIUS); }
150  { this->SetKernelFootprint(N_CLOSEST); }
152 
154 
158  vtkSetClampMacro(Radius,double,0.0,VTK_FLOAT_MAX);
159  vtkGetMacro(Radius,double);
161 
163 
167  vtkSetClampMacro(NumberOfPoints,int,1,VTK_INT_MAX);
168  vtkGetMacro(NumberOfPoints,int);
170 
172 
177  vtkSetMacro(NormalizeWeights,bool);
178  vtkGetMacro(NormalizeWeights,bool);
179  vtkBooleanMacro(NormalizeWeights,bool);
181 
182 protected:
185 
187  double Radius;
190 
191 private:
192  vtkGeneralizedKernel(const vtkGeneralizedKernel&) VTK_DELETE_FUNCTION;
193  void operator=(const vtkGeneralizedKernel&) VTK_DELETE_FUNCTION;
194 };
195 
196 #endif
dynamic, self-adjusting array of double
flexible, general interpolation kernels
KernelStyle
Enum used to select the interpolation basis form.
list of point or cell ids
Definition: vtkIdList.h:37
a simple class to control print indentation
Definition: vtkIndent.h:40
base class for interpolation kernels
virtual vtkIdType ComputeWeights(double x[3], vtkIdList *pIds, vtkDoubleArray *weights)=0
Given a point x, and a list of basis points pIds, compute interpolation weights associated with these...
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287
#define VTK_INT_MAX
Definition: vtkType.h:153
#define VTK_FLOAT_MAX
Definition: vtkType.h:161