Go to the documentation of this file.00001 #ifndef vipl_moment_h_
00002 #define vipl_moment_h_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include <vipl/filter/vipl_filter_2d.h>
00031
00032
00033 template <class ImgIn,class ImgOut,class DataIn,class DataOut,VCL_DFL_TYPE_PARAM_STLDECL(PixelItr, vipl_trivial_pixeliter) >
00034 class vipl_moment : public vipl_filter_2d<ImgIn,ImgOut,DataIn,DataOut,PixelItr>
00035 {
00036
00037 private:
00038 int order_;
00039 int width_;
00040 int height_;
00041 int& ref_order(){return order_;}
00042 int& ref_width(){return width_;}
00043 int& ref_height(){return height_;}
00044 void put_order(int v){order_=v;}
00045 void put_width(int v){width_=v;}
00046 void put_height(int v){height_=v;}
00047 public:
00048 int order() const {return order_;}
00049 int width() const {return width_;}
00050 int height() const {return height_;}
00051
00052
00053 public:
00054 inline vipl_moment(int n,int w=3,int h=3)
00055 : vipl_filter_2d<ImgIn,ImgOut,DataIn,DataOut,PixelItr>(), order_(n), width_(w), height_(h) {}
00056 inline vipl_moment(vipl_moment const& A)
00057 : vipl_filter_2d<ImgIn,ImgOut,DataIn,DataOut,PixelItr>(A), order_(A.order()), width_(A.width()), height_(A.height()) {}
00058 inline ~vipl_moment() {}
00059
00060
00061 bool section_applyop();
00062 };
00063
00064 #ifdef INSTANTIATE_TEMPLATES
00065 #include "vipl_moment.txx"
00066 #endif
00067
00068 #endif // vipl_moment_h_