Main Page   Class Overview   Pixels   Images   Geometry   Quick Index  

Binary pixel operation.

Pseudo code of the operation:

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.


Return to patterns.


Generated on Tue Jan 8 13:59:38 2002 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001