00001 #ifndef __PotentialFactory__
00002 #define __PotentialFactory__
00003
00004
00005
00024 #include <stdio.h>
00025
00026 #include "ImagePotential.hpp"
00027
00028 #define NUMBER_POTENTIAL_CONTEXT 3
00029 #define NUMBER_POTENTIAL_MODELS 5
00030
00031 class PotentialFactory
00032 {
00033 public:
00034
00035 const static char context[NUMBER_POTENTIAL_CONTEXT][64];
00036
00037 const static char model[NUMBER_POTENTIAL_MODELS][64];
00038 const static int modelContext[NUMBER_POTENTIAL_MODELS];
00039
00040
00041 protected:
00042
00043
00044 ImagePotential* createBrightArea();
00045 ImagePotential* createDarkArea();
00046
00047 ImagePotential* createHomogeneousBrightnessArea();
00048 ImagePotential* createHomogeneousColorArea();
00049
00050 ImagePotential* createCentralValueArea();
00051
00052 public:
00053
00054 PotentialFactory(){}
00055 virtual ~PotentialFactory(){}
00056
00057 static int numberOfContexts(){ return NUMBER_POTENTIAL_CONTEXT; }
00058 static int numberOfModels(){ return NUMBER_POTENTIAL_MODELS; }
00059
00060 static const char* getContext(int i){ return PotentialFactory::context[getModelContext(i)]; }
00061 static const char* getModel(int i){ return PotentialFactory::model[i]; }
00062 static const int getModelContext(int i){ return PotentialFactory::modelContext[i]; }
00063
00064 ImagePotential* createModel(int indexModel);
00065
00066 virtual void report(FILE* file){}
00067 };
00068
00069
00070
00071 #endif