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

AnImageOp.hpp

00001 #ifndef __AnImageOp__
00002 #define __AnImageOp__
00003 
00023 #include <stdio.h>
00024 
00025 #include "AnImage.hpp"
00026 #include "AR3ChannelConverter.hpp"
00027 
00028 #include "AbsLimiter.hpp"
00029 
00030 class AnImageOp
00031 {
00032 protected:
00033 
00034 int                             channelDepth;           // processing depth
00035 
00036 bool                            autoLuminanceFlag;      // if on RGB will be treated as Grey
00037 
00038 AbsLimiter*                     limiter;
00039 
00041 int                                     maskValue;                      
00042 
00044 int                                     nMask;
00046 int*                            xm;
00048 int*                            ym;
00049 
00050 protected:
00051 
00053 
00055 virtual void loadMask(AnImage& mask);
00057 virtual void unloadMask(){ delete[] xm; delete[] ym; nMask=0; }
00058 
00059 public:
00060         
00061 AnImageOp()
00062         {nMask=0; xm=0; ym=0; maskValue=255; limiter=0; autoLuminanceFlag=false; channelDepth=8;}
00063 virtual ~AnImageOp();
00064 
00065 virtual int getChannelDepth(){return channelDepth;}
00066 virtual void setChannelDepth(int val){channelDepth= val;}
00067 
00068 virtual bool getLuminanceFlag(){ return autoLuminanceFlag; }
00069 virtual void setLuminanceFlag(bool autoGrey=true){ autoLuminanceFlag= autoGrey; }
00070 
00071 virtual AbsLimiter* getLimiter(){return limiter;}
00072 virtual void setLimiter(AbsLimiter* alimiter=0){ limiter= alimiter; }
00073 
00075 virtual int  getMaskValue(){return maskValue;}
00077 virtual void setMaskValue(int value){maskValue= value;}
00078 
00079 virtual void setMask(int n, int* xp, int* yp){ xm=xp; ym=yp; nMask=n; }
00080 
00082 
00086 virtual AnImage* filter(AnImage* src, AnImage* dest=0)=0;
00087 
00089 
00094 virtual AnImage* filter(AR3ChannelConverter* convertor, AnImage* src, AnImage* dest=0)
00095                 { return filter(src,dest); }
00096 
00098 
00103 virtual AnImage* selectedFilter(AnImage* mask, AnImage* src, AnImage* dest=0)
00104                 { return filter(src,dest); }
00105 
00107 
00113 virtual AnImage* selectedFilter(AR3ChannelConverter* convertor, AnImage* mask, AnImage* src, AnImage* dest=0)
00114                 { return filter(src,dest); }
00115 
00116 virtual void report(FILE* file){}
00117 };
00118 
00119 
00120 #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