13 #ifndef IMAGE_GAIN_HPP
14 #define IMAGE_GAIN_HPP
27 virtual double get(
int i,
int j,
int k)
const
29 return L->
get(i, j, k) * value;
32 virtual void tweak(
int a,
int v)
34 if (a == 0) value += 0.1 * v;
37 virtual void doc(std::ostream& out)
const
39 out <<
"gain " << value;
virtual double get(int i, int j, int k) const =0
Return the value of the sample at row i, column j, channel k.
virtual void doc(std::ostream &out) const
Produce a string documenting the function of this object.
Definition: image_gain.hpp:37
image * L
Left child.
Definition: image.hpp:117
gain(double value, image *L)
Multiply value by all samples of L. This alters the contrast of L.
Definition: image_gain.hpp:25
Base class for all image sources, filters, and operators.
Definition: image.hpp:20
virtual void tweak(int a, int v)
Tweak image parameter a, changing the value by a factor of v.
Definition: image_gain.hpp:32
Gain filter.
Definition: image_gain.hpp:20