VTK  9.3.0
vtkImageConvolve.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
18#ifndef vtkImageConvolve_h
19#define vtkImageConvolve_h
20
21#include "vtkImagingGeneralModule.h" // For export macro
23
24VTK_ABI_NAMESPACE_BEGIN
25class VTKIMAGINGGENERAL_EXPORT vtkImageConvolve : public vtkThreadedImageAlgorithm
26{
27public:
29
34 void PrintSelf(ostream& os, vtkIndent indent) override;
36
38
41 vtkGetVector3Macro(KernelSize, int);
43
45
48 void SetKernel3x3(const double kernel[9]);
49 void SetKernel5x5(const double kernel[25]);
51
52 void SetKernel7x7(const double kernel[49]);
53
55
59 void GetKernel3x3(double kernel[9]);
60 double* GetKernel5x5() VTK_SIZEHINT(25);
61 void GetKernel5x5(double kernel[25]);
63
64 double* GetKernel7x7() VTK_SIZEHINT(49);
65 void GetKernel7x7(double kernel[49]);
66
70 void SetKernel3x3x3(const double kernel[27]);
71
72 void SetKernel5x5x5(const double kernel[125]);
73 void SetKernel7x7x7(const double kernel[343]);
74
76
79 double* GetKernel3x3x3() VTK_SIZEHINT(27);
80 void GetKernel3x3x3(double kernel[27]);
82
83 double* GetKernel5x5x5() VTK_SIZEHINT(125);
84 void GetKernel5x5x5(double kernel[125]);
85 double* GetKernel7x7x7() VTK_SIZEHINT(343);
86 void GetKernel7x7x7(double kernel[343]);
87
88protected:
90 ~vtkImageConvolve() override;
91
92 void ThreadedRequestData(vtkInformation* request, vtkInformationVector** inputVector,
93 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
94 int outExt[6], int id) override;
95
96 void GetKernel(double* kernel);
97 double* GetKernel();
98 void SetKernel(const double* kernel, int sizeX, int sizeY, int sizeZ);
99
100 int KernelSize[3];
101 double Kernel[343];
102
103private:
104 vtkImageConvolve(const vtkImageConvolve&) = delete;
105 void operator=(const vtkImageConvolve&) = delete;
106};
107
108VTK_ABI_NAMESPACE_END
109#endif
Convolution of an image with a kernel.
static vtkImageConvolve * New()
Construct an instance of vtkImageConvolve filter.
void SetKernel3x3(const double kernel[9])
Set the kernel to be a given 3x3 or 5x5 or 7x7 kernel.
void SetKernel7x7(const double kernel[49])
void SetKernel5x5(const double kernel[25])
Set the kernel to be a given 3x3 or 5x5 or 7x7 kernel.
double * GetKernel3x3()
Return an array that contains the kernel.
void PrintSelf(ostream &os, vtkIndent indent) override
Construct an instance of vtkImageConvolve filter.
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
#define VTK_SIZEHINT(...)