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

void Impala::Core::Array::IntegrateReduceLineWeighted ( Array::Array2dScalarReal64 *&  dst,
Array::Array2dScalarReal64 *  src,
int  n,
int  dstY,
int  srcY,
double  weight 
)

this is a subroutine of IntegrateReduceWeighted, note that the reduced regions overlap, that's where the funny pointer loop comes from.

src is assumed to have a border of (at least) 1

Definition at line 67 of file IntegrateReduce.h.

References Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CPB(), and Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CW().

Referenced by IntegrateReduceWeighted().

00070 {
00071     double* dstPtr = dst->CPB(0, dstY);
00072     for(int dstX=0 ; dstX<dst->CW() ; ++dstX)
00073     {
00074         double accu = 0;
00075         int srcX=dstX*n - 1; //note the -1: the iterations overlap
00076         double* srcPtr = src->CPB(srcX, srcY); 
00077         accu += 0.33 * *srcPtr++;
00078         accu += 0.67 * *srcPtr++;
00079         for(int i=1 ; i<n-1 ; ++i)
00080         {
00081             accu += *srcPtr++;
00082         }
00083         accu += 0.67 * *srcPtr++;
00084         accu += 0.33 * *srcPtr++; //this is at srcX + n, so this too overlaps
00085         *dstPtr += weight * accu;
00086         ++dstPtr;
00087     }
00088 }

Here is the call graph for this function:


Generated on Fri Mar 19 10:56:51 2010 for ImpalaSrc by  doxygen 1.5.1