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