00001
00002
00003
00004
00005
00006
00007
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00030
00031 #ifndef ADVANCED_FUNCTIONS0D_HPP
00032 # define ADVANCED_FUNCTIONS0D_HPP
00033
00034
00035 # include "../image/Image.h"
00036 # include "../image/GaussianFilter.h"
00037 # include "../view_map/Functions0D.h"
00038
00039
00040
00041
00043
00044 namespace Functions0D {
00045
00046
00052 class LIB_STROKE_EXPORT DensityF0D : public UnaryFunction0D<double>
00053 {
00054 public:
00061 DensityF0D(double sigma = 2) : UnaryFunction0D<double>() {
00062 _filter.SetSigma((float)sigma);
00063 }
00065 string getName() const {
00066 return "DensityF0D";
00067 }
00069 double operator()(Interface0DIterator& iter);
00070
00071 private:
00072
00073 GaussianFilter _filter;
00074 };
00075
00076
00081 class LIB_STROKE_EXPORT LocalAverageDepthF0D : public UnaryFunction0D<double>
00082 {
00083 private:
00084 GaussianFilter _filter;
00085 public:
00089 LocalAverageDepthF0D(real maskSize=5.f) : UnaryFunction0D<double>() {
00090 _filter.SetSigma((float)maskSize/2.f);
00091 }
00093 string getName() const {
00094 return "LocalAverageDepthF0D";
00095 }
00097 double operator()(Interface0DIterator& iter);
00098 };
00099
00100
00103 class LIB_STROKE_EXPORT ReadMapPixelF0D : public UnaryFunction0D<float>
00104 {
00105 private:
00106 const char * _mapName;
00107 int _level;
00108 public:
00117 ReadMapPixelF0D(const char *iMapName, int level) : UnaryFunction0D<float>() {
00118 _mapName = iMapName;
00119 _level = level;
00120 }
00122 string getName() const {
00123 return "ReadMapPixelF0D";
00124 }
00126 float operator()(Interface0DIterator& iter);
00127 };
00128
00129
00132 class LIB_STROKE_EXPORT ReadSteerableViewMapPixelF0D : public UnaryFunction0D<float>
00133 {
00134 private:
00135 unsigned _orientation;
00136 int _level;
00137 public:
00146 ReadSteerableViewMapPixelF0D(unsigned nOrientation, int level) : UnaryFunction0D<float>() {
00147 _orientation = nOrientation;
00148 _level = level;
00149 }
00151 string getName() const {
00152 return "ReadSteerableViewMapPixelF0D";
00153 }
00155 float operator()(Interface0DIterator& iter);
00156 };
00157
00158
00161 class LIB_STROKE_EXPORT ReadCompleteViewMapPixelF0D : public UnaryFunction0D<float>
00162 {
00163 private:
00164 int _level;
00165 public:
00171 ReadCompleteViewMapPixelF0D(int level) : UnaryFunction0D<float>() {
00172 _level = level;
00173 }
00175 string getName() const {
00176 return "ReadCompleteViewMapPixelF0D";
00177 }
00179 float operator()(Interface0DIterator& iter);
00180 };
00181
00182
00185 class LIB_STROKE_EXPORT GetViewMapGradientNormF0D: public UnaryFunction0D< float>
00186 {
00187 private:
00188 int _level;
00189 float _step;
00190 public:
00196 GetViewMapGradientNormF0D(int level) : UnaryFunction0D<float>() {
00197 _level = level;
00198 _step = (float)pow(2.0,_level);
00199 }
00201 string getName() const {
00202 return "GetViewMapGradientNormF0D";
00203 }
00205 float operator()(Interface0DIterator& iter);
00206 };
00207 }
00208
00209 #endif // ADVANCED_FUNCTIONS0D_HPP