00001 #ifndef __ISimpleDilatationOp__
00002 #define __ISimpleDilatationOp__
00003
00005
00006
00007
00008
00009
00010
00012
00013 #include <stdio.h>
00014
00015 #include "ISimpleMorphologicalOp.hpp"
00016
00017
00018 class ISimpleDilatationOp : public ISimpleMorphologicalOp
00019 {
00020 protected:
00021
00022 int ntimes;
00023
00024 int grey;
00025 int r, g, b;
00026
00027
00028 protected:
00029
00030 virtual bool greyNeigbour(AnImage* src, int x, int y);
00031
00032 virtual bool colorNeigbour(AnImage* src, int x, int y);
00033
00034 public:
00035
00036 ISimpleDilatationOp(int n, int greyFg)
00037 {ntimes= n; grey= greyFg; r= grey; g= grey; b= grey;}
00038 ISimpleDilatationOp(int n, int red, int green, int blue)
00039 {ntimes= n; grey= (33*red+55*green+12*blue)/100; r= red; g= green; b= blue;}
00040
00041 virtual ~ISimpleDilatationOp(){}
00042
00043 virtual void setIterations(int iter){ntimes=iter;}
00044
00045 virtual AnImage* filter(AnImage* src, AnImage* dest=0);
00046
00047 virtual void report(FILE* file){}
00048 };
00049
00050
00051 #endif