00001 #ifndef __ColorBeltramiFilter__ 00002 #define __ColorBeltramiFilter__ 00003 00004 00005 00027 #include <stdio.h> 00028 00029 // #include "AnImage.hpp" 00030 #include "RImage.hpp" 00031 00032 #include "ARColorImageFilter.hpp" 00033 00034 class ColorBeltramiFilter : public ARColorImageFilter 00035 { 00036 protected: 00037 00038 int niterations; 00039 double alpha; 00040 00041 // temporary data for computation 00042 Real3CImage* p; 00043 Real3CImage* q; 00044 RImage* gsqrtInv; 00045 00046 protected: 00047 00048 virtual double operation(Real3CImage& image, int ch, int x, int y); 00049 00050 virtual void operations(Real3CImage& result, Real3CImage& image); 00051 virtual void operations(AnImage& mask, Real3CImage& result, Real3CImage& image); 00052 00053 public: 00054 00055 ColorBeltramiFilter(int n=50, double ralpha=0.1); 00056 virtual ~ColorBeltramiFilter(){} 00057 00058 00059 // single shot filtering 00060 virtual Real3CImage* filter(Real3CImage* src, Real3CImage* dest=0); 00061 virtual Real3CImage* selectedFilter(AnImage* mask, Real3CImage* src, Real3CImage* dest=0); 00062 00063 00064 00065 virtual void report(FILE* file){} 00066 }; 00067 00068 00069 #endif