42 virtual double get(
int i,
int j,
int k)
const = 0;
97 virtual void tweak(
int a,
int v)
111 virtual void doc(std::ostream& out)
const
113 out <<
"undocumented";
122 void setP(
image *p) { P = p; }
127 static inline int mod(
int a,
int n)
129 return (a % n < 0) ? (a % n + n) : (a % n);
132 static inline int wrap(
int i,
int n,
bool w)
134 if (i < 0)
return w ? mod(i, n) : 0;
135 else if (i > n - 1)
return w ? mod(i, n) : n - 1;
virtual void tweak(int a, int v)
Tweak image parameter a, changing the value by a factor of v.
Definition: image.hpp:97
image * L
Left child.
Definition: image.hpp:117
virtual void doc(std::ostream &out) const
Produce a string documenting the function of this object.
Definition: image.hpp:111
image(image *L=0, image *R=0)
Create a new image object with left child L and right child R. The parents of L and R are set to this...
Definition: image.hpp:26
virtual ~image()
Finalize this image object by deleting any children.
Definition: image.hpp:34
Base class for all image sources, filters, and operators.
Definition: image.hpp:20
image * P
Parent.
Definition: image.hpp:119
virtual int get_height() const
Return the height of this image.
Definition: image.hpp:46
virtual int get_depth() const
Return the depth of this image.
Definition: image.hpp:66
virtual int get_width() const
Return the height of this image.
Definition: image.hpp:56
image * getP()
Return the parent.
Definition: image.hpp:90
image * getR()
Return the right child.
Definition: image.hpp:83
image * getL()
Return the left child.
Definition: image.hpp:76
image * R
Right child.
Definition: image.hpp:118
virtual void process()
Process all samples of both children.
Definition: image.hpp:103