Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

Translation variant binary pixel operation

Pseudo code of the operation:

BinaryPixOp(Dst, Src1, Src2, Bpo)
{
    foreach d, s1, s2 in Dst, Src1, Src2
        Dst(d) = Bpo.doIt(Src1(s1), Src2(s2), s1.x, s1.y, s1.z);
}

The requirements on the BpoT template parameter expressed as class definition are:

template<class DstValT, class Src1ValT, class Src2ValT>
class BpoT
{
public:
    typedef HxTagTransVar       TransVarianceCategory;

                        BpoT(HxTagList&);

    DstValT             doIt(const Src1ValT& v1, const Src2ValT& v2,
                             int x, int y, int z);

    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 Mon Jan 27 15:49:13 2003 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001