00001 #ifndef Impala_Core_Array_InvSphericalDer_h
00002 #define Impala_Core_Array_InvSphericalDer_h
00003
00004 #include <vector>
00005 #include "Core/Array/Trait/M9N4poFSph.h"
00006 #include "Core/Array/Trait/M9poFSphericalRx.h"
00007 #include "Core/Array/Trait/M9poFSphericalRy.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 InvSphericalDer(std::vector<ArrayT*> src)
00029 {
00030 Trait::M9N4poFSph<ArrayT, ArrayT> traitThetaPhi;
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 traitThetaPhi);
00036
00037 ArrayT* r_x = ArrayClone<ArrayT>(src[0]);
00038 Trait::M9poFSphericalRx<ArrayT, ArrayT> traitRx;
00039 Pattern::PatM9PixOp<ArrayT>(r_x, src[0], src[3], src[6],
00040 src[1], src[4], src[7],
00041 src[2], src[5], src[8],
00042 traitRx);
00043 resList.push_back(r_x);
00044
00045 ArrayT* r_y = ArrayClone<ArrayT>(src[0]);
00046 Trait::M9poFSphericalRy<ArrayT, ArrayT> traitRy;
00047 Pattern::PatM9PixOp<ArrayT>(r_y, src[0], src[3], src[6],
00048 src[1], src[4], src[7],
00049 src[2], src[5], src[8],
00050 traitRy);
00051 resList.push_back(r_y);
00052 return resList;}
00053
00054 }
00055 }
00056 }
00057
00058 #endif