13 #ifndef IMAGE_ARITHMETIC_HPP
14 #define IMAGE_ARITHMETIC_HPP
29 virtual double get(
int i,
int j,
int k)
const
31 return L->
get(i, j, k)
35 virtual void doc(std::ostream& out)
const
54 virtual double get(
int i,
int j,
int k)
const
56 return L->
get(i, j, k)
60 virtual void doc(std::ostream& out)
const
80 virtual double get(
int i,
int j,
int k)
const
82 if (
double v =
L->
get(i, j, k))
83 return v *
R->
get(i, j, k);
88 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.
Difference operator.
Definition: image_arithmetic.hpp:45
image * L
Left child.
Definition: image.hpp:117
Sum operator.
Definition: image_arithmetic.hpp:20
Base class for all image sources, filters, and operators.
Definition: image.hpp:20
multiply(image *L, image *R)
Multiply all samples of image L and image R. This operator is short- circuited and will only evaluate...
Definition: image_arithmetic.hpp:78
sum(image *L, image *R)
Add all samples of image L and image R. The width, height, and depth of the result are the larger of ...
Definition: image_arithmetic.hpp:27
virtual void doc(std::ostream &out) const
Produce a string documenting the function of this object.
Definition: image_arithmetic.hpp:60
virtual void doc(std::ostream &out) const
Produce a string documenting the function of this object.
Definition: image_arithmetic.hpp:88
difference(image *L, image *R)
Subtract all samples of image R from image L. The width, height, and depth of the result are the larg...
Definition: image_arithmetic.hpp:52
image * R
Right child.
Definition: image.hpp:118
Multiplication operator.
Definition: image_arithmetic.hpp:70
virtual void doc(std::ostream &out) const
Produce a string documenting the function of this object.
Definition: image_arithmetic.hpp:35