BinaryPixOp(Out, In1, In2, PixOp) { foreach i1, i2, o in In1, In2, Out Out(o) = PixOp(In1(i1), In2(i2)); }
The requirements on the BpoT template parameter expressed as class definition are:
template<class DstValT, class Src1ValT, class Src2ValT> class BpoT { public: BpoT(HxTagList&); DstValT doIt(const Src1ValT& x, const Src2ValT& y); static HxString className(); };
The function doIt will be called with 2 parameters of type Src1ImgSigT::ArithType and Src2ImgSigT::ArithType, and the result will be stored in a variable of type DstImgSigT::ArithType before being written to the destination image.