00001 #ifndef __IFDistanceAosPeronaOp__ 00002 #define __IFDistanceAosPeronaOp__ 00003 00029 #include <stdio.h> 00030 00031 #include "IFMultiImageOp.hpp" 00032 00033 #include "Float3CImage.hpp" 00034 00035 00036 class IFDistanceAosPeronaOp : public IFMultiImageOp 00037 { 00038 private: 00039 00040 int type; 00041 00042 int iter; 00043 double sigmaDelta; 00044 double sigmaBlur; 00045 00046 double tmin, tmax; 00047 FImage* distanceMapEdges; 00048 00049 bool iir; 00050 bool nonLinear; 00051 00052 protected: 00053 00054 // mono channel 00055 00056 virtual AnImage* greyFilter(AnImage* src, AnImage* dest=0); 00057 virtual AnImage* greySelectedFilter(AnImage* mask, AnImage* src, AnImage* dest=0); 00058 00059 // separate color channels 00060 00061 virtual Float3CImage* scolorFilter(Float3CImage* src, Float3CImage* dest=0); 00062 virtual Float3CImage* scolorSelectedFilter(AnImage* mask, Float3CImage* src, Float3CImage* dest=0); 00063 00064 00065 // separate color channels 00066 00067 virtual Float3CImage* fcolorFilter(Float3CImage* src, Float3CImage* dest=0); 00068 virtual Float3CImage* fcolorSelectedFilter(AnImage* mask, Float3CImage* src, Float3CImage* dest=0); 00069 00070 public: 00071 00072 IFDistanceAosPeronaOp(int atype=0, FImage* edgeDistance=0, int iterations=1, double tMin=0.0, double tMax=20.0, 00073 double K=1.0, double sigma=3.0, 00074 bool iirF=false, bool colorFlag= false, bool nonLinearF=true) 00075 :IFMultiImageOp(1,colorFlag) 00076 {type= atype; iter= iterations; tmin= tMin; tmax= tMax; distanceMapEdges=edgeDistance; 00077 sigmaDelta= K; sigmaBlur=sigma; iir= iirF; nonLinear=nonLinearF; } 00078 virtual ~IFDistanceAosPeronaOp(){} 00079 00080 void setEdgeDistance(FImage* distanceMap){ distanceMapEdges= distanceMap; } 00081 00082 virtual void report(FILE* file){} 00083 }; 00084 00085 00086 #endif