version 3.3

VRS::ImagePixelOp Class Reference

Monadic image operations. More...

#include <vrs/image/imagepixelop.h>

Inheritance diagram for VRS::ImagePixelOp:

VRS::ImageManipulator VRS::SharedObj VRS::Visitable

List of all members.

Public Types

enum  Operation {
  SetValue, AddValue, SubValue, SetScaledValue,
  AddScaledValue, SubScaledValue, MultValue, SquareValue,
  GammaValue, AndValue, OrValue, XOrValue,
  NotValue, LShiftValue, ShiftValue, Filter,
  ColorFilter, AlphaFilter, Threshold, Add
}

Public Member Functions

 VRS_SERIALIZABLE_CLASS_ENUM (Operation)
 ImagePixelOp (int opType, double value)
void setOperation (int opType)
int getOperation () const
 Sets/returns the operation type of the pixel-operation object.
void setValue (double value)
double getValue () const
void setFilterCallback (Callback2< void *, void * > *cb)
Callback2< void *, void * > * getFilterCallback () const
void setReferenceColor (const Color &c)
Color getReferenceColor () const
void setSubstituteColor (const Color &c)
Color getSubsituteColor () const
void setAlpha (double alpha)
double getAlpha () const
void setTolerance (double t)
double getTolerance () const
virtual Imagemanipulate (Image *source, Image *target)
virtual bool operatesInPlace () const
 VRS_TYPEINFO (ImagePixelOp, ImageManipulator)

Static Public Member Functions

static void setValue (Image *srcImage, Image *dstImage, double value)
static void addValue (Image *srcImage, Image *dstImage, double value)
static void subValue (Image *srcImage, Image *dstImage, double value)
static void setScaledValue (Image *srcImage, Image *dstImage, double clamped)
static void addScaledValue (Image *srcImage, Image *dstImage, double clamped)
static void subScaledValue (Image *srcImage, Image *dstImage, double clamped)
static void multValue (Image *srcImage, Image *dstImage, double value)
static void squareValue (Image *srcImage, Image *dstImage)
static void gammaValue (Image *srcImage, Image *dstImage, double value)
static void andValue (Image *srcImage, Image *dstImage, double value)
static void orValue (Image *srcImage, Image *dstImage, double value)
static void xorValue (Image *srcImage, Image *dstImage, double value)
static void notValue (Image *srcImage, Image *dstImage)
static void lshiftValue (Image *srcImage, Image *dstImage, double value)
static void rshiftValue (Image *srcImage, Image *dstImage, double value)
static void add (Image *srcImage, Image *dstImage)
static void threshold (Image *srcImage, Image *dstImage, double value)
static void filter (Image *srcI, Image *dstI, Callback2< void *, void * > *callback)
static void colorFilter (Image *srcI, Image *dstI, const Color &refColor, const Color &subsColor, double tolerance=0.0)
static void alphaFilter (Image *srcI, Image *dstI, const Color &refColor, double alphaValue, double tolerance=0.0)


Detailed Description

Monadic image operations.

Member Enumeration Documentation

Enumerator:
SetValue 
AddValue 
SubValue 
SetScaledValue 
AddScaledValue 
SubScaledValue 
MultValue 
SquareValue 
GammaValue 
AndValue 
OrValue 
XOrValue 
NotValue 
LShiftValue 
ShiftValue 
Filter 
ColorFilter 
AlphaFilter 
Threshold 
Add 


Constructor & Destructor Documentation

VRS::ImagePixelOp::ImagePixelOp ( int  opType,
double  value 
)

A pixel-operation object encapsulate one pixel-operation applied to a source image. Most operation types require one parameter, the value, which can be set separately. The pixel-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 pixel oerations in a more convienent way.


Member Function Documentation

VRS::ImagePixelOp::VRS_SERIALIZABLE_CLASS_ENUM ( Operation   ) 

void VRS::ImagePixelOp::setOperation ( int  opType  ) 

int VRS::ImagePixelOp::getOperation (  )  const

Sets/returns the operation type of the pixel-operation object.

static void VRS::ImagePixelOp::setValue ( Image srcImage,
Image dstImage,
double  value 
) [static]

static void VRS::ImagePixelOp::addValue ( Image srcImage,
Image dstImage,
double  value 
) [static]

static void VRS::ImagePixelOp::subValue ( Image srcImage,
Image dstImage,
double  value 
) [static]

static void VRS::ImagePixelOp::setScaledValue ( Image srcImage,
Image dstImage,
double  clamped 
) [static]

static void VRS::ImagePixelOp::addScaledValue ( Image srcImage,
Image dstImage,
double  clamped 
) [static]

static void VRS::ImagePixelOp::subScaledValue ( Image srcImage,
Image dstImage,
double  clamped 
) [static]

static void VRS::ImagePixelOp::multValue ( Image srcImage,
Image dstImage,
double  value 
) [static]

static void VRS::ImagePixelOp::squareValue ( Image srcImage,
Image dstImage 
) [static]

static void VRS::ImagePixelOp::gammaValue ( Image srcImage,
Image dstImage,
double  value 
) [static]

static void VRS::ImagePixelOp::andValue ( Image srcImage,
Image dstImage,
double  value 
) [static]

static void VRS::ImagePixelOp::orValue ( Image srcImage,
Image dstImage,
double  value 
) [static]

static void VRS::ImagePixelOp::xorValue ( Image srcImage,
Image dstImage,
double  value 
) [static]

static void VRS::ImagePixelOp::notValue ( Image srcImage,
Image dstImage 
) [static]

static void VRS::ImagePixelOp::lshiftValue ( Image srcImage,
Image dstImage,
double  value 
) [static]

static void VRS::ImagePixelOp::rshiftValue ( Image srcImage,
Image dstImage,
double  value 
) [static]

static void VRS::ImagePixelOp::add ( Image srcImage,
Image dstImage 
) [static]

static void VRS::ImagePixelOp::threshold ( Image srcImage,
Image dstImage,
double  value 
) [static]

void VRS::ImagePixelOp::setValue ( double  value  ) 

double VRS::ImagePixelOp::getValue (  )  const

Sets/returns the parameter value used by the operation. The notValue and squareValue operations do not use the value. Also the filter operations do use their own paramters, see below.

static void VRS::ImagePixelOp::filter ( Image srcI,
Image dstI,
Callback2< void *, void * > *  callback 
) [static]

void VRS::ImagePixelOp::setFilterCallback ( Callback2< void *, void * > *  cb  ) 

Callback2<void*,void*>* VRS::ImagePixelOp::getFilterCallback (  )  const

Calls the given callback for all pixels of the region of interest. For simplicity, the data type is casted to void*. The callback must know the actual data type of the image.

static void VRS::ImagePixelOp::colorFilter ( Image srcI,
Image dstI,
const Color refColor,
const Color subsColor,
double  tolerance = 0.0 
) [static]

static void VRS::ImagePixelOp::alphaFilter ( Image srcI,
Image dstI,
const Color refColor,
double  alphaValue,
double  tolerance = 0.0 
) [static]

The color filter replaces all pixel with the reference color by the substitution color. Pixel values are replaced if their color is within the given tolerance. The filtering is restricted to the current region of interest.

void VRS::ImagePixelOp::setReferenceColor ( const Color c  ) 

Color VRS::ImagePixelOp::getReferenceColor (  )  const

void VRS::ImagePixelOp::setSubstituteColor ( const Color c  ) 

Color VRS::ImagePixelOp::getSubsituteColor (  )  const

void VRS::ImagePixelOp::setAlpha ( double  alpha  ) 

double VRS::ImagePixelOp::getAlpha (  )  const

void VRS::ImagePixelOp::setTolerance ( double  t  ) 

double VRS::ImagePixelOp::getTolerance (  )  const

virtual Image* VRS::ImagePixelOp::manipulate ( Image srcImage,
Image dstImage 
) [virtual]

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::ImagePixelOp::operatesInPlace (  )  const [virtual]

See `ImageManipulator'. This manipulator can operate in place.

Reimplemented from VRS::ImageManipulator.

VRS::ImagePixelOp::VRS_TYPEINFO ( ImagePixelOp  ,
ImageManipulator   
)


The documentation for this class was generated from the following file:

Generated on Mon May 21 06:00:18 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact