Conjecture::ImageArgs Class Reference

#include <ImageArgs.h>

Inheritance diagram for Conjecture::ImageArgs:

Conjecture::Root List of all members.

Detailed Description

A tiny service class that stores image and pixel-filtering information.

********************************************************************

Instances of this class are often used as literal arguments to Image-related methods. See Image::Image and Glyph::writeImage for examples.

This class may be removed when a more general Image infrastructure is in place!


Public Member Functions

 ImageArgs (uint8_t magnification=1, uint16_t threshold=0, uint16_t quantize=0, uint8_t filter=0, uint8_t dustsize=0)
uint8_t magnification () const
uint16_t threshold () const
uint16_t quantize () const
uint8_t filter () const
uint8_t dustsize () const
uint8_t & magnification ()
uint16_t & threshold ()
uint16_t & quantize ()
uint8_t & filter ()
uint8_t & dustsize ()
uint16_t apply (const Image *image, const Coord &pos) const

Static Public Attributes

static const uint16_t MaxVal = 255
static const uint16_t MinVal = 0


Constructor & Destructor Documentation

Conjecture::ImageArgs::ImageArgs uint8_t  magnification = 1,
uint16_t  threshold = 0,
uint16_t  quantize = 0,
uint8_t  filter = 0,
uint8_t  dustsize = 0
 

Constructor (in default mode, provides an ImageArgs that does no pixel modification).


Member Function Documentation

uint16_t Conjecture::ImageArgs::apply const Image image,
const Coord pos
const
 

Given an image and position, returns a new color value for that pixel position based on the values of fields.

Note that the order in which the operations is performed significantly affects results. The order is always: filter, quantize, threshold, dustsize.


Member Data Documentation

const uint16_t Conjecture::ImageArgs::MaxVal = 255 [static]
 

FUTURE FIX: It is possible for a particular image to have a a non-standard maximum intensity, so specifying MaxVal here may be problematic. Note that it totally ignores the idea of 2-byte color values, for example. Do we pass maxval as an optional 2nd parameter to 'adjust'???


The documentation for this class was generated from the following files:
Generated on Thu Jun 15 19:56:11 2006 for Conjecture by  doxygen 1.4.6