13 #ifndef IMAGE_BLEND_HPP
14 #define IMAGE_BLEND_HPP
31 virtual double get(
int i,
int j,
int k)
const
35 if (a == 1.0)
return L->
get(i, j, k);
36 if (a == 0.0)
return R->
get(i, j, k);
38 return a *
L->
get(i, j, k) + (1.0 - a) *
R->
get(i, j, k);
46 virtual void doc(std::ostream& out)
const
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
Base class for all image sources, filters, and operators.
Definition: image.hpp:20
blend(image *L, image *R)
Blend image L with image R using the alpha channel of L. The alpha channel is taken to be the last ch...
Definition: image_blend.hpp:29
Blend operator.
Definition: image_blend.hpp:20
virtual void doc(std::ostream &out) const
Produce a string documenting the function of this object.
Definition: image_blend.hpp:46
virtual int get_depth() const
Return the depth of this image.
Definition: image.hpp:66
image * R
Right child.
Definition: image.hpp:118
virtual int get_depth() const
Return the depth of this image.
Definition: image_blend.hpp:41