00001
00002
00003
00004
00005
00006
00007
00008
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