00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef HxUpoGetPixElt_h
00011 #define HxUpoGetPixElt_h
00012
00013 #include "HxTagList.h"
00014 #include "HxClassName.h"
00015
00016
00017 template<class DstValT, class SrcValT>
00018 class HxUpoGetPixElt
00019 {
00020 public:
00021 HxUpoGetPixElt(HxTagList& tags);
00022
00023 DstValT doIt(const SrcValT& x)
00024 { return x.getValue(_dim);}
00025
00026 static HxString className()
00027 { return HxString("getPixelElement"); }
00028
00029 private:
00030 int _dim;
00031 };
00032
00033 template<class DstValT, class SrcValT>
00034 inline
00035 HxUpoGetPixElt<DstValT, SrcValT>::HxUpoGetPixElt(HxTagList& tags)
00036 {
00037 _dim = HxGetTag(tags, "dimension", int(1));
00038 if (_dim < 0)
00039 _dim = 1;
00040 _dim = ((_dim - 1) % 3) + 1;
00041 }
00042
00043 #endif
00044