13 #ifndef IMAGE_OFFSETS_HPP
14 #define IMAGE_OFFSETS_HPP
27 :
image(L), rows(rows), columns(columns), mode(mode) { }
29 virtual double get(
int i,
int j,
int k)
const
32 wrap(j - columns,
L->
get_width (), mode & 2), k);
35 virtual void tweak(
int a,
int v)
37 if (a == 0) columns += v;
38 if (a == 1) rows += v;
41 virtual void doc(std::ostream& out)
const
43 out <<
"offset " << rows <<
" " << columns <<
" " << mode;
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 tweak(int a, int v)
Tweak image parameter a, changing the value by a factor of v.
Definition: image_offset.hpp:35
image * L
Left child.
Definition: image.hpp:117
offset(int rows, int columns, int mode, image *L)
Offset the pixels of L. Rows gives the vertical distance. Columns gives the horizontal distance...
Definition: image_offset.hpp:26
Base class for all image sources, filters, and operators.
Definition: image.hpp:20
virtual int get_height() const
Return the height of this image.
Definition: image.hpp:46
Offset filter.
Definition: image_offset.hpp:20
virtual int get_width() const
Return the height of this image.
Definition: image.hpp:56
virtual void doc(std::ostream &out) const
Produce a string documenting the function of this object.
Definition: image_offset.hpp:41