| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/image/imageditherop.h>

Public Types | |
| enum | Operation { OrderedDither, FloydSteinbergDither, RiemsmerDither } |
Public Member Functions | |
| VRS_SERIALIZABLE_CLASS_ENUM (Operation) | |
| ImageDitherOp (Operation opType, DitherMatrix *ditherMatrix) | |
| void | setOperation (Operation opType) |
| Operation | getOperation () const |
| Sets/returns the operation type of the pixel-operation object. | |
| void | setDitherMatrix (DitherMatrix *ditherMatrix) |
| DitherMatrix * | getDitherMatrix () const |
| virtual Image * | manipulate (Image *source, Image *target) |
| virtual bool | operatesInPlace () const |
| VRS_TYPEINFO (ImageDitherOp, ImageManipulator) | |
Static Public Member Functions | |
| static void | orderedDithering (Image *srcI, Image *dstI, DitherMatrix *ditherMatrix) |
| static void | floydSteinbergDithering (Image *srcI, Image *dstI, double threshold=0.5) |
| static void | riemersmaDithering (Image *srcI, Image *dstI, int queueSize=16) |
| VRS::ImageDitherOp::ImageDitherOp | ( | Operation | opType, | |
| DitherMatrix * | ditherMatrix | |||
| ) |
A region-operation object encapsulate one region-operation applied to a source image. Most operation types require two parameters, which can be set separately. The region-operation object can form part of an operation seuquence, e.g., ManipulatorList. All operations are accessible also as static methods which can be invoked directly. The Image class contains methods which access the region oerations in a more convienent way.
| VRS::ImageDitherOp::VRS_SERIALIZABLE_CLASS_ENUM | ( | Operation | ) |
| void VRS::ImageDitherOp::setOperation | ( | Operation | opType | ) |
| Operation VRS::ImageDitherOp::getOperation | ( | ) | const |
Sets/returns the operation type of the pixel-operation object.
| void VRS::ImageDitherOp::setDitherMatrix | ( | DitherMatrix * | ditherMatrix | ) |
| DitherMatrix* VRS::ImageDitherOp::getDitherMatrix | ( | ) | const |
Sets/returns the parameter value used by the operation. The parameters are defined as follows for the operations: flip: 2 parameter, horizontal flag, vertical flag blur: 2 parameter, size x, size y mosaic: 2 parameter, size x, size y grey-scale: no parameter
The image operation is apply to the source image and the the resulting image is stored in the target image. The handle of the target image is returned.
Implements VRS::ImageManipulator.
| virtual bool VRS::ImageDitherOp::operatesInPlace | ( | ) | const [virtual] |
See `ImageManipulator'. This manipulator can operate in place.
Reimplemented from VRS::ImageManipulator.
| static void VRS::ImageDitherOp::orderedDithering | ( | Image * | srcI, | |
| Image * | dstI, | |||
| DitherMatrix * | ditherMatrix | |||
| ) | [static] |
Tiles the image into blocks of sizeX x sizeY. Replaces the pixel value within a block by the average pixel value in the block.
| static void VRS::ImageDitherOp::floydSteinbergDithering | ( | Image * | srcI, | |
| Image * | dstI, | |||
| double | threshold = 0.5 | |||
| ) | [static] |
Dithers the image by distributing the pixel error. Implements the classical Floyd-Steinberg approach. In addition, we change the direction for each scan line.
| static void VRS::ImageDitherOp::riemersmaDithering | ( | Image * | srcI, | |
| Image * | dstI, | |||
| int | queueSize = 16 | |||
| ) | [static] |
Implements the Riemersma dithering: traverses the image space along a Hilbert curve. An error queue records the gradient of the last pixel traversed.
| VRS::ImageDitherOp::VRS_TYPEINFO | ( | ImageDitherOp | , | |
| ImageManipulator | ||||
| ) |