Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Imaging/vtkImageConvolve.h

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