Fill
Description
Sets all image values to a single value, which is given in the constructor. For complex images, this can be a complex number (which will be reduced to its modulus for real images).
Full scope is iplt::alg::Fill in C++, resp iplt.alg.Fill in Python.
Examples
C++
#include <iplt/image.hh> #include <iplt/alg/fill.hh> using namespace iplt; int main() { ImageHandle img_real = CreateImage(Size(10,10)); img_real.ApplyIP( alg::Fill(2.0) ); ImageHandle img_complex = CreateImage(Size(10,10), COMPLEX); img_complex.ApplyIP( alg::Fill(Complex(1.0,3.0)) ); return 0; }
Python
from iplt import * img_real = CreateImage(Size(10,10)) img_real.ApplyIP( alg.Fill(2.0) ) img_complex = CreateImage(Size(10,10)) img_complex.ApplyIP( alg.Fill(2.0+3.0j) )
Back to Algorithm List
