MultiPixOp(Dst, Src[], Mpo) { foreach d, s, in Dst, Src[] Dst(d) = Mpo.doIt(Src[0](s) ... Src[N](s)); }
The requirements on the MpoT template parameter expressed as class definition are:
template<class DstValT, class SrcValT> class MpoT { public: typedef HxTagTransInVar TransVarianceCategory; MpoT(HxTagList& tags); DstValT doIt(SrcValT const *v); static HxString className(); };
The function doIt will be called with an array containing the pixels of the source images. On construction, the number of sources can be retrieved from the tag list by tag "sourceCnt". The result will be stored in a variable of type DstImgSigT::ArithType before being written to the destination image.