VTK  9.3.20240328
vtkInterpolationKernel.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
39 #ifndef vtkInterpolationKernel_h
40 #define vtkInterpolationKernel_h
41 
42 #include "vtkFiltersPointsModule.h" // For export macro
43 #include "vtkObject.h"
44 
45 VTK_ABI_NAMESPACE_BEGIN
47 class vtkIdList;
48 class vtkDoubleArray;
49 class vtkDataSet;
50 class vtkPointData;
51 
52 class VTKFILTERSPOINTS_EXPORT vtkInterpolationKernel : public vtkObject
53 {
54 public:
56 
60  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
73 
75 
81  vtkSetMacro(RequiresInitialization, bool);
82  vtkGetMacro(RequiresInitialization, bool);
83  vtkBooleanMacro(RequiresInitialization, bool);
85 
95  virtual vtkIdType ComputeBasis(double x[3], vtkIdList* pIds, vtkIdType ptId = 0) = 0;
96 
107  virtual vtkIdType ComputeWeights(double x[3], vtkIdList* pIds, vtkDoubleArray* weights) = 0;
108 
109 protected:
112 
117 
118  // Just clear out the data. Can be overloaded by subclasses as necessary.
119  virtual void FreeStructures();
120 
121 private:
123  void operator=(const vtkInterpolationKernel&) = delete;
124 };
125 
126 VTK_ABI_NAMESPACE_END
127 #endif
abstract class to quickly locate points in 3-space
abstract class to specify dataset behavior
Definition: vtkDataSet.h:165
dynamic, self-adjusting array of double
list of point or cell ids
Definition: vtkIdList.h:132
a simple class to control print indentation
Definition: vtkIndent.h:108
base class for interpolation kernels
vtkAbstractTypeMacro(vtkInterpolationKernel, vtkObject)
Standard method for type and printing.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard method for type and printing.
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...
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...
virtual void Initialize(vtkAbstractPointLocator *loc, vtkDataSet *ds, vtkPointData *pd)
Initialize the kernel.
vtkAbstractPointLocator * Locator
~vtkInterpolationKernel() override
virtual void FreeStructures()
abstract base class for most VTK objects
Definition: vtkObject.h:161
represent and manipulate point attribute data
Definition: vtkPointData.h:139
int vtkIdType
Definition: vtkType.h:315