contrib/brl/bseg/brip/brip_kernel.h
Go to the documentation of this file.
00001 // This is brl/bseg/brip/brip_kernel.h
00002 #ifndef brip_kernel_h
00003 #define brip_kernel_h
00004 //:
00005 // \file
00006 // \brief A base class for 2d convolution kernels that can be shifted
00007 // \author Amir Tamrakar
00008 // \date 9 Sept 2006
00009 //
00010 // \verbatim
00011 //  Modifications
00012 //   <none yet>
00013 // \endverbatim
00014 
00015 #include <vil/vil_image_view.h>
00016 
00017 //: base class for shiftable 2d kernels
00018 class brip_kernel : public vil_image_view<double>
00019 {
00020  protected:
00021   double dx, dy; ///< operator shifts,
00022   double theta;  ///< operator rotation
00023 
00024  public:
00025   brip_kernel(unsigned w, unsigned h, double dx_=0.0, double dy_=0.0, double theta_=0.0):
00026       dx(dx_), dy(dy_), theta(theta_)
00027   {
00028     set_size(w,h);
00029     //fill(0.0);
00030   }
00031 
00032   ~brip_kernel(){}
00033 
00034   //: recompute kernel with given subpixel shifts
00035   virtual void recompute_kernel(double dx_=0.0, double dy_=0.0, double theta=0.0)=0;
00036 };
00037 
00038 #endif // brip_kernel_h