Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

AFSpatialDiscretisation.hpp

00001 #ifndef __AFSpatialDiscretisation_H__
00002 #define __AFSpatialDiscretisation_H__
00003 
00004 
00005 
00027 #include <stdio.h>
00028 
00029 #include "FImage.hpp"
00030 #include "AFSymMatrix.hpp"
00031 #include "FloatVector.hpp"
00032 
00034 
00039 enum  PixelOrder { Natural=0, RedBlack=1, Unknown=9 };
00040 
00041 class AFSpatialDiscretisation
00042 {
00043 protected:
00044 
00045 bool            fixedMatrix;
00046 PixelOrder      order;
00047 
00048 public:
00049 AFSpatialDiscretisation(bool fixed=false){order= Natural; fixedMatrix=fixed; }
00050 virtual ~AFSpatialDiscretisation(){}    
00051 
00052 virtual void    setI0(FImage* u0){}
00053 virtual FImage*         getI0(){return 0;}
00054 
00055 virtual void    setTauRight(float t){}
00056 virtual float   setTauRight(){return 0.0;}
00057 
00058 virtual void init(FImage* uk){}
00059 
00060 // A * u(k+1) = u(k) used on unsplitted schemes
00061 // --------------------------------------------
00062 virtual FloatVector* getB(FImage* ik, FloatVector* uk=0);
00063 virtual FImage* getImage(FloatVector* uk, FImage* ik);
00064 
00065 virtual AFSymMatrix* getA(float tau, FImage* uk, AFSymMatrix* Afull=0)=0;
00066 
00067 // u[k+1]= (I + tau*A)*u[k]
00068 virtual AFSymMatrix* getAexplicit(float tau, FImage* uk, AFSymMatrix* Afull=0);
00069 
00070 // (I - tau*A)*u[k+1]= u[k]
00071 virtual AFSymMatrix* getAsemiImplicit(float tau, FImage* uk, AFSymMatrix* Afull=0);
00072 
00073 // A * u(k+1) = u(k) used on splitted schemes
00074 // ------------------------------------------
00075 virtual FloatVector* getRowB(FImage* ik, int row, FloatVector* uk=0);
00076 virtual FImage* getRowImage(FloatVector* uk, int row, FImage* ik);
00077 
00078 virtual FloatVector* getColB(FImage* ik, int col, FloatVector* uk=0);
00079 virtual FImage* getColImage(FloatVector* uk, int col, FImage* ik);
00080 
00081 virtual AFSymMatrix* getRowA(float tau, FImage* uk, int row, AFSymMatrix* A1=0)=0;
00082 virtual AFSymMatrix* getColA(float tau, FImage* uk, int col, AFSymMatrix* A2=0)=0;
00083 
00084 // u[k+1]= (I + tau*A)*u[k]
00085 virtual AFSymMatrix* getRowAexplicit(float tau, FImage* uk, int row, AFSymMatrix* A1=0);
00086 virtual AFSymMatrix* getColAexplicit(float tau, FImage* uk, int col, AFSymMatrix* A2=0);
00087 
00088 // (I - tau*A)*u[k+1]= u[k]
00089 virtual AFSymMatrix* getRowAsemiImplicit(float tau, FImage* uk, int row, AFSymMatrix* A1=0);
00090 virtual AFSymMatrix* getColAsemiImplicit(float tau, FImage* uk, int col, AFSymMatrix* A2=0);
00091 };
00092 
00093 #endif
00094 
00095          
SourceForge.net Logo
Restoreinpaint sourceforge project `C++/Java Image Processing, Restoration, Inpainting Project'.

Bernard De Cuyper: Open Project Leader: Concept, design and development.
Bernard De Cuyper & Eddy Fraiha 2002, 2003. Bernard De Cuyper 2004. Open and free, for friendly usage only.
Modifications on Belgium ground of this piece of artistic work, by governement institutions or companies, must be notified to Bernard De Cuyper.
bern_bdc@hotmail.com