00001 #ifndef __FSimpleTVInpaintingSpace_H__ 00002 #define __FSimpleTVInpaintingSpace_H__ 00003 00057 #include "FClassicAnisotropicSpace.hpp" 00058 00059 #include "AnImage.hpp" 00060 00061 class FSimpleTVInpaintingSpace : public FClassicAnisotropicSpace 00062 { 00063 protected: 00064 00065 // computation of g(.) 00066 float tauRight; 00067 float beta; 00068 00069 float betaCorrection; // correction=1.0/(1.0+tau*beta) 00070 00071 FImage* f; // origin image 00072 00073 AnImage* inpaintingDomain; // domain D 00074 AnImage* extensionDomain; // if 0=image-D, else around D only 00075 00076 protected: 00077 00078 virtual FImage* gValues(FImage* src, FImage* dest=0); 00079 00080 public: 00081 FSimpleTVInpaintingSpace(double sigma=2.0, double acontrast=1.0, double abeta=0.0, int diffusivity=0, int gradType=0 ); 00082 virtual ~FSimpleTVInpaintingSpace(){} 00083 00084 virtual void setI0(FImage* u0){f=u0;} 00085 virtual FImage* getI0(){return f;} 00086 00087 virtual void setInpaintingDomain(AnImage* area){inpaintingDomain=area;} 00088 virtual AnImage* getInpaintingDomain(){return inpaintingDomain;} 00089 00090 virtual void setExtensionDomain(AnImage* area){extensionDomain=area;} 00091 virtual AnImage* getExtensionDomain(){return extensionDomain;} 00092 00093 virtual void setTauRight(float t){tauRight= t;} 00094 virtual float getTauRight(){return tauRight;} 00095 00096 // A * u(k+1) = u(k) used on unsplitted schemes 00097 // -------------------------------------------- 00098 virtual AFSymMatrix* getA(float tau, FImage* uk, AFSymMatrix* A=0); 00099 virtual FloatVector* getB(FImage* ik, FloatVector* uk=0); 00100 00101 // A * u(k+1) = u(k) used on splitted schemes 00102 // ------------------------------------------ 00103 virtual AFSymMatrix* getRowA(float tau, FImage* uk, int row, AFSymMatrix* A1=0); 00104 virtual AFSymMatrix* getColA(float tau, FImage* uk, int col, AFSymMatrix* A2=0); 00105 00106 virtual FloatVector* getRowB(FImage* ik, int row, FloatVector* uk=0); 00107 virtual FloatVector* getColB(FImage* ik, int col, FloatVector* uk=0); 00108 }; 00109 00110 #endif 00111 00112