InPixOp(Out, PixOp) { for p = 1 to PixOp.nrPhases(); { PixOp.init(p) foreach o in Out Out(o) = PixOp.doIt(o.x, o.y, o.z); PixOp.done(p) } }
The requirements on the PixOpT template parameter expressed as class definition are:
template<class ArithT> class PixOpT { public: typedef HxTagPixOpIn DirectionCategory; typedef HxTagTransVar TransVarianceCategory; typedef HxTagNPhase PhaseCategory; PixOpT(HxTagList&, int w, int h, int d); ArithT doIt(int x, int y, int z); int nrPhases() const; void init(int phase); void done(int phase); static HxString className(); };