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

AbsCImageFilter.hpp

00001 #ifndef __AbsCImageFilter__
00002 #define __AbsCImageFilter__
00003 
00004 
00005 
00027 #include <stdio.h>
00028 
00029 #include "AnImage.hpp"
00030 #include "CImage.hpp"
00031 
00032 #include "AbsLimiter.hpp"
00033 
00034 class AbsCImageFilter
00035 {
00036 protected:
00037 
00038 int                                     maskValue;                      // default 255  [1..255]
00039 
00040 int                                     nMask;
00041 int*                            xm;
00042 int*                            ym;
00043 
00044 AbsLimiter*                             limiter;
00045 
00046 protected:
00047 
00049 
00051 virtual void loadMask(AnImage& mask);
00053 virtual void unloadMask(){ delete[] xm; delete[] ym; nMask=0; }
00054 
00055 public:
00056         
00057 AbsCImageFilter(){nMask=0; xm=0; ym=0; maskValue=1; limiter=0;}
00058 virtual ~AbsCImageFilter(){}
00059 
00060 virtual AbsLimiter* getLimiter(){return limiter;}
00061 virtual void setLimiter(AbsLimiter* alimiter){ limiter= alimiter; }
00062 
00063 virtual int  getMaskValue(){return maskValue;}
00064 virtual void setMaskValue(int value){maskValue= value;}
00065 
00066 virtual void setMask(int n, int* xp, int* yp){ xm=xp; ym=yp; nMask=n; }
00067 
00068 virtual void setI0(CImage* Istart){}
00069 
00071 virtual void prepare(CImage* src){}
00073 virtual void clear(){}  
00074 
00076 
00080 virtual CImage* filter(CImage* src, CImage* dest=0)=0;
00081 
00083 
00088 virtual CImage* selectedFilter(AnImage* mask, CImage* src, CImage* dest=0)
00089                 {
00090                 return filter(src, dest);
00091                 }
00092 
00094 virtual CImage* mfilter(int n, CImage* src, CImage* dest=0);
00096 virtual CImage* mSelectedFilter(int n, AnImage* mask, CImage* src, CImage* dest=0);
00097 
00098 virtual void report(FILE* file){}
00099 };
00100 
00101 
00102 #endif
SourceForge.net Logo
Restoreinpaint sourceforge project `C++/Java Image Processing, Restoration, Inpainting Project'.

Bernard De Cuyper: Open Project Leader: Concept, design and development.
Bernard De Cuyper & Eddy Fraiha 2002, 2003. Bernard De Cuyper 2004. Open and free, for friendly usage only.
Modifications on Belgium ground of this piece of artistic work, by governement institutions or companies, must be notified to Bernard De Cuyper.
bern_bdc@hotmail.com