00001 #ifndef Impala_Core_Array_InvHsiDer_h
00002 #define Impala_Core_Array_InvHsiDer_h
00003
00004 #include <vector>
00005 #include "Core/Array/Trait/M9N4poFHS.h"
00006 #include "Core/Array/Trait/M9poFO3x.h"
00007 #include "Core/Array/Trait/M9poFO3y.h"
00008 #include "Core/Array/Pattern/PatM9N4PixOp.h"
00009 #include "Core/Array/Pattern/PatM9PixOp.h"
00010
00011 namespace Impala
00012 {
00013 namespace Core
00014 {
00015 namespace Array
00016 {
00017
00018
00026 template<class ArrayT>
00027 inline std::vector<ArrayT*>
00028 InvHsiDer(std::vector<ArrayT*> src)
00029 {
00030 Trait::M9N4poFHS<ArrayT, ArrayT> traitHS;
00031 std::vector<ArrayT*> resList;
00032 resList = Pattern::PatM9N4PixOp<ArrayT>(src[0], src[3], src[6],
00033 src[1], src[4], src[7],
00034 src[2], src[5], src[8],
00035 traitHS);
00036
00037
00038 ArrayT* o3x = ArrayClone<ArrayT>(src[0]);
00039 Trait::M9poFO3x<ArrayT, ArrayT> traitO3x;
00040 Pattern::PatM9PixOp<ArrayT>(o3x, src[0], src[3], src[6],
00041 src[1], src[4], src[7],
00042 src[2], src[5], src[8],
00043 traitO3x);
00044 resList.push_back(o3x);
00045
00046 ArrayT* o3y = ArrayClone<ArrayT>(src[0]);
00047 Trait::M9poFO3y<ArrayT, ArrayT> traitO3y;
00048 Pattern::PatM9PixOp<ArrayT>(o3y, src[0], src[3], src[6],
00049 src[1], src[4], src[7],
00050 src[2], src[5], src[8],
00051 traitO3y);
00052 resList.push_back(o3y);
00053 return resList;
00054 }
00055
00056 }
00057 }
00058 }
00059
00060 #endif