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 =========================================================================*/
24 #ifndef vtkImageConvolve_h
25 #define vtkImageConvolve_h
26 
27 #include "vtkImagingGeneralModule.h" // For export macro
29 
30 class VTKIMAGINGGENERAL_EXPORT vtkImageConvolve : public vtkThreadedImageAlgorithm
31 {
32 public:
34 
37  static vtkImageConvolve *New();
39  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
41 
43 
46  vtkGetVector3Macro(KernelSize, int);
48 
50 
53  void SetKernel3x3(const double kernel[9]);
54  void SetKernel5x5(const double kernel[25]);
56 
57  void SetKernel7x7(const double kernel[49]);
58 
60 
63  double* GetKernel3x3();
64  void GetKernel3x3(double kernel[9]);
65  double* GetKernel5x5();
66  void GetKernel5x5(double kernel[25]);
68 
69  double* GetKernel7x7();
70  void GetKernel7x7(double kernel[49]);
71 
75  void SetKernel3x3x3(const double kernel[27]);
76 
77  void SetKernel5x5x5(const double kernel[125]);
78  void SetKernel7x7x7(const double kernel[343]);
79 
81 
84  double* GetKernel3x3x3();
85  void GetKernel3x3x3(double kernel[27]);
87 
88  double* GetKernel5x5x5();
89  void GetKernel5x5x5(double kernel[125]);
90  double* GetKernel7x7x7();
91  void GetKernel7x7x7(double kernel[343]);
92 
93 protected:
95  ~vtkImageConvolve() VTK_OVERRIDE;
96 
97  void ThreadedRequestData(vtkInformation *request,
98  vtkInformationVector **inputVector,
99  vtkInformationVector *outputVector,
100  vtkImageData ***inData, vtkImageData **outData,
101  int outExt[6], int id) VTK_OVERRIDE;
102 
103  void GetKernel(double *kernel);
104  double* GetKernel();
105  void SetKernel(const double* kernel,
106  int sizeX, int sizeY, int sizeZ);
107 
108 
109  int KernelSize[3];
110  double Kernel[343];
111 private:
112  vtkImageConvolve(const vtkImageConvolve&) VTK_DELETE_FUNCTION;
113  void operator=(const vtkImageConvolve&) VTK_DELETE_FUNCTION;
114 };
115 
116 #endif
117 
118 
119 
Store vtkAlgorithm input/output information.
Generic filter that has one input.
a simple class to control print indentation
Definition: vtkIndent.h:33
Convolution of an image with a kernel.
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
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.