00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef HxSftCentralMoments_h
00012 #define HxSftCentralMoments_h
00013
00014 #include "HxSampleFunctorTem.h"
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 template <class ArgType, class ResType>
00034 class HxSftCentralMoments : public HxSampleFunctorTem<ArgType,ResType>
00035 {
00036 public:
00037 HxSftCentralMoments(int order, HxString name);
00038 virtual ~HxSftCentralMoments();
00039
00040 virtual void init();
00041 virtual void next(ArgType pixV, ArgType maskV, HxPoint p);
00042 virtual void result(HxValueListBackInserter res);
00043
00044 virtual int hasPhase2();
00045
00046 virtual void init2();
00047 virtual void next2(ArgType pixV, ArgType maskV, HxPoint p);
00048 virtual void result2(HxValueListBackInserter res);
00049
00050 private:
00051 int _order;
00052 int _number;
00053 ResType _m00;
00054 ResType _m10;
00055 ResType _m01;
00056 ResType _xBar;
00057 ResType _yBar;
00058 ResType* _sums;
00059 };
00060
00061 #ifdef INC_TEMPLATE_SRC
00062 #include "HxSftCentralMoments.c"
00063 #endif
00064
00065 #endif