Main Page   Class Overview   Pixels   Images   Geometry   Quick Index  

Unary pixel operation

Pseudo code of the operation:

UnaryPixOp(Out, In, PixOp)
{
    foreach i, o in In, Out
        Out(o) = PixOp(In(i));
}

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

template<class DstValT, class SrcValT>
class UpoT
{
public:
                        UpoT(HxTagList&);

    DstValT             doIt(const SrcValT& x);

    static HxString     className();
};

The function doIt will be called with 1 parameter of type SrcImgSigT::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