00001 #ifndef __RRecursive4dIIROp__ 00002 #define __RRecursive4dIIROp__ 00003 00036 #include <stdio.h> 00037 00038 #include "RRecursive2dBlurOp.hpp" 00039 00040 class RRecursive4dIIROp 00041 { 00042 protected: 00043 00044 bool symmetric[2]; 00045 00046 00047 // basic filter parameters 00048 double sigma; 00049 00050 double scale; // normalisation factor 00051 00052 double a0[2]; 00053 double a1[2]; 00054 double b0[2]; 00055 double w0[2]; 00056 00057 double c0[2]; 00058 double c1[2]; 00059 double b1[2]; 00060 double w1[2]; 00061 00062 // causal filter parameters 00063 double n0p[2], n1p[2], n2p[2], n3p[2]; 00064 double d1p[2], d2p[2], d3p[2], d4p[2]; 00065 00066 // non-causal filter parameters 00067 double n1m[2], n2m[2], n3m[2], n4m[2]; 00068 double d1m[2], d2m[2], d3m[2], d4m[2]; 00069 00070 protected: 00071 00072 virtual void computeNormalisation(int direction); 00073 00074 virtual void computeCausalFilter(int direction); 00075 virtual void computeNonCausalFilter(int direction); 00076 00077 public: 00078 00079 RRecursive4dIIROp(double asigma=1.0); 00080 virtual ~RRecursive4dIIROp(){} 00081 00082 // single shot filtering 00083 virtual RImage* filter(RImage* src, RImage* dest=0); 00084 virtual RImage* selectedFilter(AnImage* mask, RImage* src, RImage* dest=0); 00085 00086 virtual void report(FILE* file){ fprintf(file,"Real Recursive 4d IIR Operator\n"); } 00087 }; 00088 00089 00090 #endif