00001 #ifndef __IMultiImageOp__ 00002 #define __IMultiImageOp__ 00003 00004 00023 #include <stdio.h> 00024 00025 #include "AnImageOp.hpp" 00026 #include "Real3CImage.hpp" 00027 00028 class IMultiImageOp : public AnImageOp 00029 { 00030 protected: 00031 00032 bool fullColor; // determine if full color is used 00033 00034 int iterations; // default is 50 00035 00036 protected: 00037 00038 // mono channel 00039 00040 virtual AnImage* greyFilter(AnImage* src, AnImage* dest=0); 00041 virtual AnImage* greySelectedFilter(AnImage* mask, AnImage* src, AnImage* dest=0) 00042 { return greyFilter(src,dest); } 00043 00044 // separate color channels 00045 00046 virtual Real3CImage* scolorFilter(Real3CImage* src, Real3CImage* dest=0); 00047 virtual Real3CImage* scolorSelectedFilter(AnImage* mask, Real3CImage* src, Real3CImage* dest=0) 00048 { return scolorFilter(src,dest); } 00049 00050 00051 // combined color channels 00052 00053 virtual Real3CImage* fcolorFilter(Real3CImage* src, Real3CImage* dest=0); 00054 virtual Real3CImage* fcolorSelectedFilter(AnImage* mask, Real3CImage* src, Real3CImage* dest=0) 00055 { return fcolorFilter(src,dest); } 00056 00057 public: 00058 IMultiImageOp(int iter=50, bool colorFlag= false):AnImageOp() 00059 {fullColor= colorFlag; iterations= iter; } 00060 virtual ~IMultiImageOp(){} 00061 00062 virtual void setIterations(int i){ iterations=i;} 00063 00064 virtual AnImage* filter(AnImage* src, AnImage* dest=0); 00065 virtual AnImage* filter(AR3ChannelConverter* convertor, AnImage* src, AnImage* dest=0); 00066 00067 virtual AnImage* selectedFilter(AnImage* mask, AnImage* src, AnImage* dest=0); 00068 00069 virtual AnImage* selectedFilter(AR3ChannelConverter* convertor, AnImage* mask, 00070 AnImage* src, AnImage* dest=0); 00071 00072 virtual void report(FILE* file){} 00073 }; 00074 00075 00076 #endif