VTK
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 =========================================================================*/
30 #ifndef vtkImageConvolve_h
31 #define vtkImageConvolve_h
32 
33 #include "vtkImagingGeneralModule.h" // For export macro
35 
36 class VTKIMAGINGGENERAL_EXPORT vtkImageConvolve : public vtkThreadedImageAlgorithm
37 {
38 public:
40 
43  static vtkImageConvolve *New();
45  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
49 
52  vtkGetVector3Macro(KernelSize, int);
54 
56 
59  void SetKernel3x3(const double kernel[9]);
60  void SetKernel5x5(const double kernel[25]);
62 
63  void SetKernel7x7(const double kernel[49]);
64 
66 
69  double* GetKernel3x3() VTK_SIZEHINT(9);
70  void GetKernel3x3(double kernel[9]);
71  double* GetKernel5x5() VTK_SIZEHINT(25);
72  void GetKernel5x5(double kernel[25]);
74 
75  double* GetKernel7x7() VTK_SIZEHINT(49);
76  void GetKernel7x7(double kernel[49]);
77 
81  void SetKernel3x3x3(const double kernel[27]);
82 
83  void SetKernel5x5x5(const double kernel[125]);
84  void SetKernel7x7x7(const double kernel[343]);
85 
87 
90  double* GetKernel3x3x3() VTK_SIZEHINT(27);
91  void GetKernel3x3x3(double kernel[27]);
93 
94  double* GetKernel5x5x5() VTK_SIZEHINT(125);
95  void GetKernel5x5x5(double kernel[125]);
96  double* GetKernel7x7x7() VTK_SIZEHINT(343);
97  void GetKernel7x7x7(double kernel[343]);
98 
99 protected:
101  ~vtkImageConvolve() override;
102 
103  void ThreadedRequestData(vtkInformation *request,
104  vtkInformationVector **inputVector,
105  vtkInformationVector *outputVector,
106  vtkImageData ***inData, vtkImageData **outData,
107  int outExt[6], int id) override;
108 
109  void GetKernel(double *kernel);
110  double* GetKernel();
111  void SetKernel(const double* kernel,
112  int sizeX, int sizeY, int sizeZ);
113 
114 
115  int KernelSize[3];
116  double Kernel[343];
117 private:
118  vtkImageConvolve(const vtkImageConvolve&) = delete;
119  void operator=(const vtkImageConvolve&) = delete;
120 };
121 
122 #endif
123 
124 
125 
Store vtkAlgorithm input/output information.
Generic filter that has one input.
a simple class to control print indentation
Definition: vtkIndent.h:39
Convolution of an image with a kernel.
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
#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.