Go to the documentation of this file.00001 #ifndef vipl_gradient_mag_h_
00002 #define vipl_gradient_mag_h_
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 #include <vipl/filter/vipl_filter_2d.h> 
00025 
00026 
00027 template <class ImgIn,class ImgOut,class DataIn,class DataOut, VCL_DFL_TYPE_PARAM_STLDECL(PixelItr, vipl_trivial_pixeliter) >
00028 class vipl_gradient_mag : public vipl_filter_2d<ImgIn,ImgOut,DataIn,DataOut,PixelItr>
00029 {
00030   
00031   
00032  private: double shift_;
00033  public: double shift() const { return shift_; }
00034   
00035  private: double scale_;
00036  public: double scale() const { return scale_; }
00037 
00038   
00039  public:
00040   inline vipl_gradient_mag(double s=1, double h=0)
00041            : vipl_filter_2d<ImgIn,ImgOut,DataIn,DataOut,PixelItr>(),
00042              shift_(h), scale_(s) {}
00043   inline vipl_gradient_mag(vipl_gradient_mag const& A)
00044            : vipl_filter_2d<ImgIn,ImgOut,DataIn,DataOut,PixelItr>(A),
00045              shift_(A.shift()), scale_(A.scale()) {}
00046   inline ~vipl_gradient_mag() {}
00047 
00048   
00049   bool section_applyop();
00050 };
00051 
00052 #ifdef INSTANTIATE_TEMPLATES
00053 #include "vipl_gradient_mag.txx"
00054 #endif
00055 
00056 #endif // vipl_gradient_mag_h_