00001 #ifndef __ShockFilter__ 00002 #define __ShockFilter__ 00003 00032 #include <stdio.h> 00033 00034 #include "AbsRImageFilter.hpp" 00035 00036 #include "ShockFlow.hpp" 00037 00038 class ShockFilter : public AbsRImageFilter 00039 { 00040 protected: 00041 00042 RImage* I0; // origin image 00043 RImage* I; // current image 00044 00045 int niterations; 00046 double alpha; 00047 00048 ShockFlow shock; 00049 00050 protected: 00051 00052 virtual void operations(RImage& result); 00053 virtual void operations(AnImage& mask, RImage& result); 00054 00055 public: 00056 00057 ShockFilter(int n=30, double ralpha=0.2); 00058 virtual ~ShockFilter(){} 00059 00060 virtual void setLimiter(AbsLimiter* alimiter) 00061 { 00062 AbsRImageFilter::setLimiter(alimiter); 00063 shock.setLimiter(alimiter); 00064 } 00065 00066 00067 virtual RImage* filter(RImage* src, RImage* dest=0); 00068 virtual RImage* selectedFilter(AnImage* mask, RImage* src, RImage* dest=0); 00069 00070 virtual void report(FILE* file){} 00071 }; 00072 00073 00074 #endif