13 #ifndef IMAGE_FLATTEN_HPP
14 #define IMAGE_FLATTEN_HPP
30 virtual double get(
int i,
int j,
int k)
const
34 double l = M_PI_2 * double(h - i) / h;
36 double y = sin(l) * value;
38 double r = sqrt(x * x + y * y);
40 return L->
get(-h * (asin(y / r) - M_PI_2) / M_PI_2, j, k);
43 virtual void tweak(
int a,
int v)
45 if (a == 0) value += 0.0001 * v;
48 virtual void doc(std::ostream& out)
const
50 out <<
"flatten " << value;
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_flatten.hpp:43
image * L
Left child.
Definition: image.hpp:117
Spherical flatten.
Definition: image_flatten.hpp:20
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
flatten(double value, image *L)
Account for variation in the flatness of the ellipse used to project spherical data. This filter user integer pixel locations for both input and output and performs no interpolation. This is preferable (for now) as it preserves the identity of data dropouts.
Definition: image_flatten.hpp:28
virtual void doc(std::ostream &out) const
Produce a string documenting the function of this object.
Definition: image_flatten.hpp:48