Image file writer.
#include <image_output.hpp>
Public Member Functions | |
output (std::string name, char type, image *L) | |
Write a raw-formatted data file named name. Type is a character giving the output sample type. The image height, width, and depth are given by the L image object. Unsigned samples are clamped to the range [0,1] and signed samples to the range [-1,+1] before being cast to the destination data type. | |
virtual double | get (int i, int j, int k) const |
Return the value of the sample at row i, column j, channel k. | |
virtual void | doc (std::ostream &out) const |
Produce a string documenting the function of this object. | |
virtual void | process () |
Process all samples of this image, storing them in the file. Then, switch into cached mode, sourcing all subsequent sampling from the file instead of invoking the process. This is useful as an optimization, especially for processes that feed large-kernel convolutions, as it eliminates the need to repeatedly compute expensive samples. | |
Public Member Functions inherited from image | |
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. | |
virtual | ~image () |
Finalize this image object by deleting any children. | |
virtual int | get_height () const |
Return the height of this image. | |
virtual int | get_width () const |
Return the height of this image. | |
virtual int | get_depth () const |
Return the depth of this image. | |
image * | getL () |
Return the left child. | |
image * | getR () |
Return the right child. | |
image * | getP () |
Return the parent. | |
virtual void | tweak (int a, int v) |
Tweak image parameter a, changing the value by a factor of v. | |
Additional Inherited Members | |
Protected Attributes inherited from image | |
image * | L |
Left child. | |
image * | R |
Right child. | |
image * | P |
Parent. | |