VTK  9.4.20250205
vtkGeneralizedKernel.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
51#ifndef vtkGeneralizedKernel_h
52#define vtkGeneralizedKernel_h
53
54#include "vtkFiltersPointsModule.h" // For export macro
56
57VTK_ABI_NAMESPACE_BEGIN
58class VTKFILTERSPOINTS_EXPORT vtkGeneralizedKernel : public vtkInterpolationKernel
59{
60public:
62
66 void PrintSelf(ostream& os, vtkIndent indent) override;
68
79 vtkIdType ComputeBasis(double x[3], vtkIdList* pIds, vtkIdType ptId = 0) override;
80
96 double x[3], vtkIdList* pIds, vtkDoubleArray* prob, vtkDoubleArray* weights) = 0;
97
107 vtkIdType ComputeWeights(double x[3], vtkIdList* pIds, vtkDoubleArray* weights) override
108 {
109 return this->ComputeWeights(x, pIds, nullptr, weights);
110 }
111
119 {
120 RADIUS = 0,
121 N_CLOSEST = 1
122 };
123
125
133 vtkSetMacro(KernelFootprint, int);
134 vtkGetMacro(KernelFootprint, int);
135 void SetKernelFootprintToRadius() { this->SetKernelFootprint(RADIUS); }
136 void SetKernelFootprintToNClosest() { this->SetKernelFootprint(N_CLOSEST); }
138
140
144 vtkSetClampMacro(Radius, double, 0.0, VTK_FLOAT_MAX);
145 vtkGetMacro(Radius, double);
147
149
153 vtkSetClampMacro(NumberOfPoints, int, 1, VTK_INT_MAX);
154 vtkGetMacro(NumberOfPoints, int);
156
158
163 vtkSetMacro(NormalizeWeights, bool);
164 vtkGetMacro(NormalizeWeights, bool);
165 vtkBooleanMacro(NormalizeWeights, bool);
167
168protected:
171
173 double Radius;
176
177private:
179 void operator=(const vtkGeneralizedKernel&) = delete;
180};
181
182VTK_ABI_NAMESPACE_END
183#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:133
a simple class to control print indentation
Definition vtkIndent.h:108
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:315
#define VTK_INT_MAX
Definition vtkType.h:144
#define VTK_FLOAT_MAX
Definition vtkType.h:152