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) override;
80 
91  vtkIdType ComputeBasis(double x[3], vtkIdList *pIds, vtkIdType ptId=0) override;
92 
107  virtual vtkIdType ComputeWeights(double x[3], vtkIdList *pIds,
108  vtkDoubleArray *prob, vtkDoubleArray *weights) = 0;
109 
119  vtkIdType ComputeWeights(double x[3], vtkIdList *pIds, vtkDoubleArray *weights) override
120  {
121  return this->ComputeWeights(x,pIds,nullptr,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:
184  ~vtkGeneralizedKernel() override;
185 
187  double Radius;
190 
191 private:
193  void operator=(const vtkGeneralizedKernel&) = delete;
194 };
195 
196 #endif
vtkGeneralizedKernel::Radius
double Radius
Definition: vtkGeneralizedKernel.h:187
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:161
vtkIdType
int vtkIdType
Definition: vtkType.h:349
vtkGeneralizedKernel::SetKernelFootprintToNClosest
void SetKernelFootprintToNClosest()
Definition: vtkGeneralizedKernel.h:149
vtkGeneralizedKernel::NumberOfPoints
int NumberOfPoints
Definition: vtkGeneralizedKernel.h:188
vtkInterpolationKernel.h
vtkInterpolationKernel::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInterpolationKernel::ComputeBasis
virtual vtkIdType ComputeBasis(double x[3], vtkIdList *pIds, vtkIdType ptId=0)=0
Given a point x (and optional associated point id), determine the points around x which form an inter...
vtkGeneralizedKernel::SetKernelFootprintToRadius
void SetKernelFootprintToRadius()
Definition: vtkGeneralizedKernel.h:147
vtkGeneralizedKernel::ComputeWeights
vtkIdType ComputeWeights(double x[3], vtkIdList *pIds, vtkDoubleArray *weights) override
Given a point x, and a list of basis points pIds, compute interpolation weights associated with these...
Definition: vtkGeneralizedKernel.h:119
vtkGeneralizedKernel::KernelStyle
KernelStyle
Enum used to select the interpolation basis form.
Definition: vtkGeneralizedKernel.h:130
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkGeneralizedKernel
flexible, general interpolation kernels
Definition: vtkGeneralizedKernel.h:70
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
VTK_FLOAT_MAX
#define VTK_FLOAT_MAX
Definition: vtkType.h:169
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:41
vtkInterpolationKernel::ComputeWeights
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...
vtkGeneralizedKernel::KernelFootprint
int KernelFootprint
Definition: vtkGeneralizedKernel.h:186
vtkInterpolationKernel
base class for interpolation kernels
Definition: vtkInterpolationKernel.h:64
vtkGeneralizedKernel::NormalizeWeights
bool NormalizeWeights
Definition: vtkGeneralizedKernel.h:189