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

Translation variant M output, N input pixel operation

Pseudo code of the operation:

MNPixOp(Dst[], Src[], MNpo)
{
    foreach d, s, in Dst[], Src[]
        Dst[0](d) ... Dst[M](d) = MNpo.doIt(Src[0](s), ..., Src[N](s),
                                            i.x, i.y, i.z);
}

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

template<class DstValT, class SrcValT>
class MNpoT
{
public:
    typedef HxTagTransVar       TransVarianceCategory;

                    MNpoT(HxTagList& tags);
    
    void            doIt(DstValT *d, SrcValT const *s, int x, int y, int z);
    
    static HxString className();
};

The function doIt will be called with 2 arrays, destination pixels and source pixels. On construction, the number of sources can be retrieved from the tag list by tag "sourceCnt". The constructor should return the required number of destination images by the tag "resultCnt". The results should be stored in the y-array before being written to the destination images. If the operation is not applicable for the given number of source images, the constructor may indicate failure in the pre-conditioning by returning "preOpIsOk" false in the tag list.


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