00001 #ifndef __SimilarPixelFMM__ 00002 #define __SimilarPixelFMM__ 00003 00004 00005 00034 #include "ImagePotential.hpp" 00035 00036 #include "DistanceFMM.hpp" 00037 00038 class SimilarPixelFMM : public DistanceFMM 00039 { 00040 protected: 00041 00042 int x0, y0; // start point 00043 00044 00045 bool distanceGrowingFlag; 00046 00047 protected: 00048 00049 00050 ImagePotential* potential; 00051 00052 00053 protected: 00054 00055 virtual double getPotential(int i, int j); 00056 00057 public: 00058 00059 SimilarPixelFMM(); 00060 virtual ~SimilarPixelFMM(){ } 00061 00062 00064 00065 00066 virtual void setPotential(ImagePotential* pot); 00067 virtual ImagePotential* getPotential(){ return potential; } 00068 00069 virtual void setInitiator(int x, int y); 00070 virtual void setData(AnImage* im); 00071 00072 00073 00074 00076 virtual RImage* compute(RImage* dest=0); 00077 00079 virtual AnImage* filter(AnImage* mask, AnImage* dest=0); 00080 virtual AnImage* selectedFilter(AnImage* mask, AnImage* src, AnImage* dest=0) 00081 { return filter(src, dest); } 00082 00083 virtual void report(){} 00084 }; 00085 00086 #endif