00001 #ifndef CELL_H 00002 #define CELL_H 00003 00004 #include "cimg/CImg.h" 00005 #include "tempTools.h" 00006 #include "recfilter.h" 00007 #include "gabor.h" 00008 #include "cimg/cimg_tools.h" 00009 00010 #ifdef FFT_FILTERING 00011 #include "fftTools.h" 00012 #endif // FFT_FILTERING 00013 00014 using namespace cimg_library; 00015 00016 class Cell : public RecFilter 00017 { 00018 protected: 00019 double spatialPeriod, spatialPhase, orientation; 00020 double sigma; 00021 int spatFilterDegree; 00022 double convValue; 00023 00024 CImg<double> *userFilter; 00025 #ifdef FFT_FILTERING 00026 CImg<double> *convResult; 00027 #endif // FFT_FILTERING 00028 00029 public: 00030 Cell(double stepp=1); 00031 ~Cell(void); 00032 00033 void set_spatialPeriod(double val); 00034 void set_spatialPhase(double val); 00035 void set_orientation(double val); 00036 void set_spatialFilterDegree(int dg); 00037 void set_spatialFilter(CImg<double> *spatFilter); 00038 #ifdef FFT_FILTERING 00039 void set_convResult(CImg<double> *convR); 00040 #endif // FFT_FILTERING 00041 00042 void allocateValues(void); 00043 double spatialFiltering(CImg<double> image, double posx, double posy); 00044 00045 void setConvValue(double cValue); 00046 double getConvValue(); 00047 }; 00048 00049 #endif // CELL_H