13 #ifndef IMAGE_CHOOSE_HPP
14 #define IMAGE_CHOOSE_HPP
29 virtual double get(
int i,
int j,
int k)
const
31 return which ?
R->
get(i, j, k) :
L->
get(i, j, k);
34 virtual void tweak(
int a,
int v)
36 if (a == 0) which += v;
39 virtual void doc(std::ostream& out)
const
41 out <<
"choose " << which;
virtual double get(int i, int j, int k) const =0
Return the value of the sample at row i, column j, channel k.
image * L
Left child.
Definition: image.hpp:117
virtual void tweak(int a, int v)
Tweak image parameter a, changing the value by a factor of v.
Definition: image_choose.hpp:34
Base class for all image sources, filters, and operators.
Definition: image.hpp:20
virtual void doc(std::ostream &out) const
Produce a string documenting the function of this object.
Definition: image_choose.hpp:39
Choose operator.
Definition: image_choose.hpp:20
image * R
Right child.
Definition: image.hpp:118
choose(int which, image *L, image *R)
Choose image L if which is 0 or image R if which is 1. This is akin to turning a layer on and off...
Definition: image_choose.hpp:27