[Algorithms and Utility Functions]

Detailed Description

Equivalent to std::generate.

Example: Set each channel of a pixel to its semantic index. The channels must be assignable from an integer.

struct consecutive_fn {
    int& _current;
    consecutive_fn(int& start) : _current(start) {}
    int operator()() { return _current++; }
rgb8_pixel_t p;
int start=0;
static_generate(p, consecutive_fn(start));
assert(p == rgb8_pixel_t(0,1,2));


template<typename P1, typename Op>
GIL_FORCEINLINE void static_generate (P1 &dst, Op op)

Generated on Sat May 2 13:50:17 2009 for Generic Image Library by  doxygen 1.5.6