vtk_interpolator
InterpolationKernels
A collection of interpolation kernels for VTK interpolators.
__init__()
gaussian_kernel(radius=10, sharpness=6)
staticmethod
Initizlize and return gaussian interpolation kernel.
For more info see
https://vtk.org/doc/nightly/html/classvtkGaussianKernel.html#details
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radius |
float
|
Kernel radius. Defaults to 10. |
10
|
sharpness |
int
|
Kernel sharpness. Defaults to 6. |
6
|
Returns:
| Name | Type | Description |
|---|---|---|
vtkGaussianKernel |
vtkGaussianKernel
|
Initialized gaussian interpolation kernel. |
linear_kernel(radius=5)
staticmethod
Initizlize and return linear interpolation kernel.
For more info see
https://vtk.org/doc/nightly/html/classvtkLinearKernel.html#details
Returns:
| Name | Type | Description |
|---|---|---|
vtkLinearKernel |
vtkLinearKernel
|
Initialized linear interpolation kernel. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radius |
int
|
Kernel radius. Defaults to 5. |
5
|
shepard_kernel(radius=10, power=5)
staticmethod
Initizlize and return shepard interpolation kernel.
For more info see
https://vtk.org/doc/nightly/html/classvtkShepardKernel.html#details
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
radius |
float
|
Kernel radius. |
10
|
power |
int
|
Kernel positive exponent. |
5
|
Returns:
| Name | Type | Description |
|---|---|---|
vtkShepardKernel |
vtkShepardKernel
|
initialized shepard interpolation kernel. |
voronoi_kernel()
staticmethod
Initizlize and return voronoi interpolation kernel.
For more info see
https://vtk.org/doc/nightly/html/classvtkVoronoiKernel.html#details
Returns:
| Name | Type | Description |
|---|---|---|
vtkVoronoiKernel |
vtkVoronoiKernel
|
Initialized voronoi interpolation kernel. |
VTKInterpolator
Class for polydata interpolation. Uses polydata points to apply one of selected kernels over it.
Following kernel are available
- Shepard kernel
- Gaussian kernel
- Voronoi kernel
- Linear kernel
For more info see
https://vtk.org/doc/nightly/html/classvtkPointInterpolator.html#details
Attributes:
| Name | Type | Description |
|---|---|---|
kernel |
The kernel used for interpolation. |
|
point_locator |
The point locator used for interpolation. |
kernel = InterpolationKernels.voronoi_kernel()
instance-attribute
point_locator = vtkPointLocator()
instance-attribute
__init__()
interpolate(input_data, source_data=None, pass_arrays=False)
Interpolate point data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_data |
vtkPolyData
|
Input polydata |
required |
source_data |
vtkPolyData
|
Source polydata which will be used for interpolation. If None input_data will be used. |
None
|
pass_arrays |
bool
|
If True all point arrays will be passed to output. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
vtkPolyData |
vtkPointInterpolator
|
vtkPolydata with interpolated data. |
interpolator(pass_arrays=False)
Return point interpolator with selected kernel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pass_arrays |
bool
|
If True all point arrays will be passed to output. Defaults to False. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
vtkPointInterpolator |
vtkPointInterpolator
|
vtkPointInterpolator object. |