Main Page | Class Hierarchy | Class List | File List | Class Members

ImageFilters.h

00001 00002 // Name: ImageFilters.h 00003 // Purpose: Image Filters (middle-value filter, Gauss filter, etc.) 00004 // Author: Alex Thuering 00005 // Created: 21.06.2003 00006 // RCS-ID: $Id: ImageFilters.h,v 1.3 2003/10/27 20:40:57 ntalex Exp $ 00007 // Copyright: (c) Alex Thuering 00008 // Licence: wxWindows licence 00010 00011 #ifndef WXVILLALIB_IMAGE_FILTERS_H 00012 #define WXVILLALIB_IMAGE_FILTERS_H 00013 00014 #include <wx/wx.h> 00015 #include <wx/image.h> 00016 00017 #ifndef uchar 00018 #define uchar unsigned char 00019 #endif 00020 00022 class wxImageFilter 00023 { 00024 public: 00026 wxImageFilter(wxImage& image, int size = 3); 00027 virtual ~wxImageFilter() {} 00028 void Run(); 00029 virtual void AdjustPixel(uchar* image, int x, int y) = 0; 00030 00031 protected: 00032 wxImage& m_img; 00033 wxImage m_origImg; 00034 int m_size; 00035 }; 00036 00039 class wxMedianImageFilter: public wxImageFilter 00040 { 00041 public: 00042 wxMedianImageFilter(wxImage& image, int size = 3): wxImageFilter(image, size){} 00043 virtual void AdjustPixel(uchar* image, int x, int y); 00044 }; 00045 00046 typedef enum wxLinearImageFilterType 00047 { lftMiddleValue, lftGauss }; 00048 00051 class wxLinearImageFilter: public wxImageFilter 00052 { 00053 public: 00054 wxLinearImageFilter(wxImage& image, wxLinearImageFilterType type,int size = 3); 00055 virtual void AdjustPixel(uchar* image, int x, int y); 00056 00057 protected: 00058 wxArrayInt m_pattern; 00059 }; 00060 00061 #endif // WXVILLALIB_IMAGE_FILTERS_H 00062

Generated on Mon Nov 19 21:06:44 2007 for wxVillaLib by doxygen 1.3.7