VTK  9.2.6
vtkImageConvolve.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImageConvolve.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
39#ifndef vtkImageConvolve_h
40#define vtkImageConvolve_h
41
42#include "vtkImagingGeneralModule.h" // For export macro
44
45class VTKIMAGINGGENERAL_EXPORT vtkImageConvolve : public vtkThreadedImageAlgorithm
46{
47public:
49
54 void PrintSelf(ostream& os, vtkIndent indent) override;
56
58
61 vtkGetVector3Macro(KernelSize, int);
63
65
68 void SetKernel3x3(const double kernel[9]);
69 void SetKernel5x5(const double kernel[25]);
71
72 void SetKernel7x7(const double kernel[49]);
73
75
79 void GetKernel3x3(double kernel[9]);
80 double* GetKernel5x5() VTK_SIZEHINT(25);
81 void GetKernel5x5(double kernel[25]);
83
84 double* GetKernel7x7() VTK_SIZEHINT(49);
85 void GetKernel7x7(double kernel[49]);
86
90 void SetKernel3x3x3(const double kernel[27]);
91
92 void SetKernel5x5x5(const double kernel[125]);
93 void SetKernel7x7x7(const double kernel[343]);
94
96
99 double* GetKernel3x3x3() VTK_SIZEHINT(27);
100 void GetKernel3x3x3(double kernel[27]);
102
103 double* GetKernel5x5x5() VTK_SIZEHINT(125);
104 void GetKernel5x5x5(double kernel[125]);
105 double* GetKernel7x7x7() VTK_SIZEHINT(343);
106 void GetKernel7x7x7(double kernel[343]);
107
108protected:
110 ~vtkImageConvolve() override;
111
112 void ThreadedRequestData(vtkInformation* request, vtkInformationVector** inputVector,
113 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
114 int outExt[6], int id) override;
115
116 void GetKernel(double* kernel);
117 double* GetKernel();
118 void SetKernel(const double* kernel, int sizeX, int sizeY, int sizeZ);
119
120 int KernelSize[3];
121 double Kernel[343];
122
123private:
124 vtkImageConvolve(const vtkImageConvolve&) = delete;
125 void operator=(const vtkImageConvolve&) = delete;
126};
127
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:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
#define VTK_SIZEHINT(...)