Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkImageConvolve.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageConvolve.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00038 #ifndef __vtkImageConvolve_h
00039 #define __vtkImageConvolve_h
00040 
00041 #include "vtkImageToImageFilter.h"
00042 
00043 class VTK_IMAGING_EXPORT vtkImageConvolve : public vtkImageToImageFilter
00044 {
00045 public:
00047 
00048   static vtkImageConvolve *New();
00049   vtkTypeRevisionMacro(vtkImageConvolve,vtkImageToImageFilter);
00050   void PrintSelf(ostream& os, vtkIndent indent);
00052 
00054 
00055   vtkGetVector3Macro(KernelSize, int);
00057 
00059 
00060   void SetKernel3x3(const double kernel[9]);
00061   void SetKernel5x5(const double kernel[25]);
00063 //BTX
00064   void SetKernel7x7(double kernel[49]);
00065 //ETX
00066 
00068 
00069   double* GetKernel3x3(); 
00070   void GetKernel3x3(double kernel[9]);
00071   double* GetKernel5x5(); 
00072   void GetKernel5x5(double kernel[25]);
00074 //BTX
00075   double* GetKernel7x7(); 
00076   void GetKernel7x7(double kernel[49]);
00077 //ETX
00078 
00080   void SetKernel3x3x3(const double kernel[27]);
00081 //BTX
00082   void SetKernel5x5x5(double kernel[125]);
00083   void SetKernel7x7x7(double kernel[343]);
00084 //ETX
00085 
00087 
00088   double* GetKernel3x3x3(); 
00089   void GetKernel3x3x3(double kernel[27]);
00091 //BTX
00092   double* GetKernel5x5x5(); 
00093   void GetKernel5x5x5(double kernel[125]);
00094   double* GetKernel7x7x7(); 
00095   void GetKernel7x7x7(double kernel[343]);
00096 //ETX
00097 
00098 protected:
00099   vtkImageConvolve();
00100   ~vtkImageConvolve();
00101 
00102   void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, 
00103                        int outExt[6], int id);
00104 
00105   void GetKernel(double *kernel);
00106   double* GetKernel();
00107   void SetKernel(const double* kernel,
00108                  int sizeX, int sizeY, int sizeZ);
00109   
00110 
00111   int KernelSize[3];
00112   double Kernel[343];
00113 private:
00114   vtkImageConvolve(const vtkImageConvolve&);  // Not implemented.
00115   void operator=(const vtkImageConvolve&);  // Not implemented.
00116 };
00117 
00118 #endif
00119 
00120 
00121