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

Public Types | |
| enum | Operation { Flip, Blur, Mosaic } |
Public Member Functions | |
| VRS_SERIALIZABLE_CLASS_ENUM (Operation) | |
| ImageRegionOp (int opType, int value1, int value2) | |
| void | setOperation (int opType) |
| int | getOperation () const |
| Sets/returns the operation type of the pixel-operation object. | |
| void | setValue (int valueNo, int value) |
| int | getValue (int valueNo) const |
| virtual Image * | manipulate (Image *source, Image *target) |
| virtual bool | operatesInPlace () const |
| VRS_TYPEINFO (ImageRegionOp, ImageManipulator) | |
Static Public Member Functions | |
| static void | flip (Image *srcImage, Image *dstImage, int flipX, int flipY) |
| static void | blur (Image *srcI, Image *dstI, int sizeX, int sizeY) |
| Replaces the pixel value by the average pixel value of its neighborhood. | |
| static void | mosaic (Image *srcI, Image *dstI, int sizeX, int sizeY) |
| VRS::ImageRegionOp::ImageRegionOp | ( | int | opType, | |
| int | value1, | |||
| int | value2 | |||
| ) |
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::ImageRegionOp::VRS_SERIALIZABLE_CLASS_ENUM | ( | Operation | ) |
| void VRS::ImageRegionOp::setOperation | ( | int | opType | ) |
| int VRS::ImageRegionOp::getOperation | ( | ) | const |
Sets/returns the operation type of the pixel-operation object.
| void VRS::ImageRegionOp::setValue | ( | int | valueNo, | |
| int | value | |||
| ) |
| int VRS::ImageRegionOp::getValue | ( | int | valueNo | ) | 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::ImageRegionOp::operatesInPlace | ( | ) | const [virtual] |
See `ImageManipulator'. This manipulator can operate in place.
Reimplemented from VRS::ImageManipulator.
| static void VRS::ImageRegionOp::flip | ( | Image * | srcImage, | |
| Image * | dstImage, | |||
| int | flipX, | |||
| int | flipY | |||
| ) | [static] |
If flipX is set, the image is flipped horizontally. If flipY is set, the image is flipped vertically.
Replaces the pixel value by the average pixel value of its neighborhood.
| static void VRS::ImageRegionOp::mosaic | ( | Image * | srcI, | |
| Image * | dstI, | |||
| int | sizeX, | |||
| int | sizeY | |||
| ) | [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.
| VRS::ImageRegionOp::VRS_TYPEINFO | ( | ImageRegionOp | , | |
| ImageManipulator | ||||
| ) |