Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

UpoGetPixElt.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Trait_UpoGetPixElt_h
00002 #define Impala_Core_Array_Trait_UpoGetPixElt_h
00003 
00004 #include "Core/Array/Pattern/Categories.h"
00005 
00006 namespace Impala
00007 {
00008 namespace Core
00009 {
00010 namespace Array
00011 {
00012 namespace Trait
00013 {
00014 
00015 
00016 template<class DstArrayT, class SrcArrayT>
00017 class UpoGetPixElt
00018 {
00019 public:
00021     typedef Pattern::TagTransInVar TransVarianceCategory;
00022 
00024     typedef Pattern::TagCallValue CallCategory;
00025 
00026     typedef typename DstArrayT::ArithType DstArithT;
00027     typedef typename SrcArrayT::ArithType SrcArithT;
00028 
00029     UpoGetPixElt(int dimension)
00030     {
00031         Reset(dimension);
00032     }
00033 
00034     void Reset(int dimension)
00035     {
00036         mDim = dimension;
00037         if (mDim < 0)
00038             mDim = 1;
00039         mDim = ((mDim - 1) % 3) + 1;
00040     }
00041 
00042     DstArithT
00043     DoIt(const SrcArithT& x)
00044     {
00045         return x.getValue(mDim);
00046     }
00047 
00048 private:
00049     int             mDim;
00050 };
00051 
00052 } // namespace Trait
00053 } // namespace Array
00054 } // namespace Core
00055 } // namespace Impala
00056 
00057 #endif

Generated on Fri Mar 19 09:31:02 2010 for ImpalaSrc by  doxygen 1.5.1