00001 #ifndef __FMaxSlopeOp__ 00002 #define __FMaxSlopeOp__ 00003 00004 00005 00026 #include <stdio.h> 00027 #include <math.h> 00028 00029 #include "FGradientNormOp.hpp" 00030 00031 00032 00033 class FMaxSlopeOp : public FGradientNormOp 00034 { 00035 private: 00036 00037 float invroot2; 00038 00039 public: 00040 00041 FMaxSlopeOp(){invroot2= 0.5*sqrt(2.0);} 00042 virtual ~FMaxSlopeOp(){} 00043 00044 // point based computations 00045 // ------------------------ 00046 virtual float get(int x, int y); // if no side effects 00047 // borders 00048 virtual float getN(int x); 00049 virtual float getE(int y); 00050 virtual float getS(int x); 00051 virtual float getW(int y); 00052 // corners 00053 virtual float getNW(); 00054 virtual float getNE(); 00055 virtual float getSE(); 00056 virtual float getSW(); 00057 00058 virtual void report(FILE* file){ fprintf(file,"MinSlope Gradient Norm Approximation\n"); } 00059 }; 00060 00061 00062 #endif