VTK  9.1.0
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
68
69class VTKFILTERSPOINTS_EXPORT vtkGeneralizedKernel : public vtkInterpolationKernel
70{
71public:
73
77 void PrintSelf(ostream& os, vtkIndent indent) override;
79
90 vtkIdType ComputeBasis(double x[3], vtkIdList* pIds, vtkIdType ptId = 0) override;
91
107 double x[3], vtkIdList* pIds, vtkDoubleArray* prob, vtkDoubleArray* weights) = 0;
108
118 vtkIdType ComputeWeights(double x[3], vtkIdList* pIds, vtkDoubleArray* weights) override
119 {
120 return this->ComputeWeights(x, pIds, nullptr, weights);
121 }
122
130 {
131 RADIUS = 0,
132 N_CLOSEST = 1
133 };
134
136
144 vtkSetMacro(KernelFootprint, int);
145 vtkGetMacro(KernelFootprint, int);
146 void SetKernelFootprintToRadius() { this->SetKernelFootprint(RADIUS); }
147 void SetKernelFootprintToNClosest() { this->SetKernelFootprint(N_CLOSEST); }
149
151
155 vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
156 vtkGetMacro(Radius, double);
158
160
164 vtkSetClampMacro(NumberOfPoints, int, 1, VTK_INT_MAX);
165 vtkGetMacro(NumberOfPoints, int);
167
169
174 vtkSetMacro(NormalizeWeights, bool);
175 vtkGetMacro(NormalizeWeights, bool);
176 vtkBooleanMacro(NormalizeWeights, bool);
178
179protected:
182
184 double Radius;
187
188private:
190 void operator=(const vtkGeneralizedKernel&) = delete;
191};
192
193#endif
dynamic, self-adjusting array of double
flexible, general interpolation kernels
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type and printing.
vtkIdType ComputeBasis(double x[3], vtkIdList *pIds, vtkIdType ptId=0) override
Based on the kernel style, invoke the appropriate locator method to obtain the points making up the b...
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...
void SetKernelFootprintToRadius()
Specify the interpolation basis style.
void SetKernelFootprintToNClosest()
Specify the interpolation basis style.
KernelStyle
Enum used to select the interpolation basis form.
virtual vtkIdType ComputeWeights(double x[3], vtkIdList *pIds, vtkDoubleArray *prob, vtkDoubleArray *weights)=0
Given a point x, a list of basis points pIds, and a probability weighting function prob,...
~vtkGeneralizedKernel() override
list of point or cell ids
Definition: vtkIdList.h:140
a simple class to control print indentation
Definition: vtkIndent.h:113
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...
int vtkIdType
Definition: vtkType.h:332
#define VTK_INT_MAX
Definition: vtkType.h:155
#define VTK_FLOAT_MAX
Definition: vtkType.h:163