00001 #ifndef __ROrthogonalConvOp__ 00002 #define __ROrthogonalConvOp__ 00003 00004 00005 00024 #include <stdio.h> 00025 00026 #include "AbsRImageFilter.hpp" 00027 00028 class ROrthogonalConvOp : public AbsRImageFilter 00029 { 00030 private: 00031 00032 int nX; 00033 double ratioX; 00034 double* kernelX; 00035 00036 00037 int nY; 00038 double ratioY; 00039 double* kernelY; 00040 00041 double combinedRatio; 00042 00043 RImage* tmpImage; 00044 00045 public: 00046 00047 ROrthogonalConvOp(double rx, double* kx, double ry, double* ky); 00048 ROrthogonalConvOp(int n, double rx, double* kx, double ry, double* ky); 00049 ROrthogonalConvOp(int nx, double rx, double* kx, int ny, double ry, double* ky); 00050 virtual ~ROrthogonalConvOp(){delete[] kernelX; delete[] kernelY;} 00051 00052 // used to globally maintain subimages avoiding cons 00053 virtual void prepare(RImage* src){tmpImage= new RImage(src->getWidth(),src->getHeight());} 00054 virtual void clear(){delete tmpImage;} 00055 00056 // single shot filtering 00057 virtual RImage* filter(RImage* src, RImage* dest=0); 00058 virtual RImage* selectedFilter(AnImage* mask, RImage* src, RImage* dest=0); 00059 00060 virtual void report(FILE* file){ fprintf(file,"Real Orthogonal Kernel Operator\n"); } 00061 }; 00062 00063 00064 #endif