VTK  9.4.20250114
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
37#ifndef vtkImageConvolve_h
38#define vtkImageConvolve_h
39
40#include "vtkImagingGeneralModule.h" // For export macro
42
43VTK_ABI_NAMESPACE_BEGIN
44class VTKIMAGINGGENERAL_EXPORT vtkImageConvolve : public vtkThreadedImageAlgorithm
45{
46public:
48
53 void PrintSelf(ostream& os, vtkIndent indent) override;
55
57
60 vtkGetVector3Macro(KernelSize, int);
62
64
67 void SetKernel3x3(const double kernel[9]);
68 void SetKernel5x5(const double kernel[25]);
70
71 void SetKernel7x7(const double kernel[49]);
72
74
78 void GetKernel3x3(double kernel[9]);
79 double* GetKernel5x5() VTK_SIZEHINT(25);
80 void GetKernel5x5(double kernel[25]);
82
83 double* GetKernel7x7() VTK_SIZEHINT(49);
84 void GetKernel7x7(double kernel[49]);
85
89 void SetKernel3x3x3(const double kernel[27]);
90
91 void SetKernel5x5x5(const double kernel[125]);
92 void SetKernel7x7x7(const double kernel[343]);
93
95
98 double* GetKernel3x3x3() VTK_SIZEHINT(27);
99 void GetKernel3x3x3(double kernel[27]);
101
102 double* GetKernel5x5x5() VTK_SIZEHINT(125);
103 void GetKernel5x5x5(double kernel[125]);
104 double* GetKernel7x7x7() VTK_SIZEHINT(343);
105 void GetKernel7x7x7(double kernel[343]);
106
107protected:
109 ~vtkImageConvolve() override;
110
111 void ThreadedRequestData(vtkInformation* request, vtkInformationVector** inputVector,
112 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
113 int outExt[6], int id) override;
114
115 void GetKernel(double* kernel);
116 double* GetKernel();
117 void SetKernel(const double* kernel, int sizeX, int sizeY, int sizeZ);
118
119 int KernelSize[3];
120 double Kernel[343];
121
122private:
123 vtkImageConvolve(const vtkImageConvolve&) = delete;
124 void operator=(const vtkImageConvolve&) = delete;
125};
126
127VTK_ABI_NAMESPACE_END
128#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:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
#define VTK_SIZEHINT(...)