00001 #ifndef __RgaussJacobiROF__ 00002 #define __RgaussJacobiROF__ 00003 00004 00005 00038 #include <stdio.h> 00039 00040 00041 #include "AbsRImageFilter.hpp" 00042 00043 00044 class RgaussJacobiROF : public AbsRImageFilter 00045 { 00046 protected: 00047 00048 RImage* I0; // origin image 00049 RImage* I; // current image 00050 00051 // Four connected stencil 00052 double u[5]; 00053 double h[5]; 00054 double w[5]; 00055 double g2[5]; 00056 00057 00058 double lambda0; // used for linear constrains around the origin 00059 double epsilon2; 00060 00061 int niterations; 00062 00063 protected: 00064 00065 virtual void computeStencil(RImage* im, int x, int y); 00066 00067 virtual double operation(RImage* im, int x, int y); 00068 00069 virtual void operations(RImage* result); 00070 virtual void operations(AnImage& mask, RImage* result); 00071 00072 public: 00073 00074 RgaussJacobiROF(int n, double alambda0=1.0); 00075 virtual ~RgaussJacobiROF(){ } 00076 00077 virtual RImage* filter(RImage* src, RImage* dest=0); 00078 virtual RImage* selectedFilter(AnImage* mask, RImage* src, RImage* dest=0); 00079 00080 virtual void report(FILE* file){} 00081 }; 00082 00083 00084 #endif