VTK  9.3.1
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 
24 VTK_ABI_NAMESPACE_BEGIN
25 class VTKIMAGINGGENERAL_EXPORT vtkImageConvolve : public vtkThreadedImageAlgorithm
26 {
27 public:
29 
32  static vtkImageConvolve* New();
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 
58  double* GetKernel3x3() VTK_SIZEHINT(9);
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 
88 protected:
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 
103 private:
104  vtkImageConvolve(const vtkImageConvolve&) = delete;
105  void operator=(const vtkImageConvolve&) = delete;
106 };
107 
108 VTK_ABI_NAMESPACE_END
109 #endif
Store vtkAlgorithm input/output information.
Generic filter that has one input.
a simple class to control print indentation
Definition: vtkIndent.h:28
Convolution of an image with a kernel.
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
#define VTK_SIZEHINT(...)
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.