template<class DstArrayT, class Src1ArrayT, class Src2ArrayT, class BpoT>
Translation variant binary pixel operation based on value call.
Definition at line 110 of file FuncBpo.h. References ArrayCH(), ArrayCPB(), ArrayCW(), PtrRead(), and PtrWrite(). 00112 { 00113 typedef typename DstArrayT::StorType DstStorT; 00114 typedef typename DstArrayT::ArithType DstArithT; 00115 typedef typename Src1ArrayT::StorType Src1StorT; 00116 typedef typename Src1ArrayT::ArithType Src1ArithT; 00117 typedef typename Src2ArrayT::StorType Src2StorT; 00118 typedef typename Src2ArrayT::ArithType Src2ArithT; 00119 00120 int width = ArrayCW(dst); 00121 int height = ArrayCH(dst); 00122 for (int y=0 ; y<height ; y++) 00123 { 00124 Src1StorT* s1Ptr = ArrayCPB(src1, 0, y); 00125 Src2StorT* s2Ptr = ArrayCPB(src2, 0, y); 00126 DstStorT* dPtr = ArrayCPB(dst, 0, y); 00127 for (int x=0 ; x<width ; x++) 00128 { 00129 PtrWrite(dPtr, bpo.DoIt(PtrRead(s1Ptr, Src1ArithT()), 00130 PtrRead(s2Ptr, Src2ArithT()),x,y)); 00131 dPtr += DstArrayT::ElemSize(); 00132 s1Ptr += Src1ArrayT::ElemSize(); 00133 s2Ptr += Src2ArrayT::ElemSize(); 00134 } 00135 } 00136 /* old: 00137 for (int z=0 ; z<dstSize.z() ; z++) { 00138 for (int y=0 ; y<dstSize.y() ; y++) { 00139 for (int x=0 ; x<dstSize.x() ; x++) { 00140 dstPtr.writeIncX( 00141 bpo.DoIt(src1Ptr.readIncX(), src2Ptr.readIncX(), x, y, z)); 00142 } 00143 } 00144 } 00145 */ 00146 }
Here is the call graph for this function:
|