Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Private Attributes
icl::filter::UnaryArithmeticalOp Class Reference

Class for Arithmetic Functions. More...

#include <UnaryArithmeticalOp.h>

Inheritance diagram for icl::filter::UnaryArithmeticalOp:
icl::filter::UnaryOp icl::utils::Configurable

List of all members.

Public Types

enum  optype {
  addOp = 0, subOp = 1, mulOp = 2, divOp = 3,
  sqrOp = 10, sqrtOp = 11, lnOp = 12, expOp = 13,
  absOp = 14
}
 this enum specifiy all possible binary arithmetical operations More...

Public Member Functions

 UnaryArithmeticalOp (optype t, icl64f val=0)
 Constructor.
virtual ~UnaryArithmeticalOp ()
 Destructor.
virtual void apply (const core::ImgBase *poSrc, core::ImgBase **ppoDst)
 performes the arithmetical operation, given in the constructor or by the setOpType method.
void setValue (icl64f value)
 sets the second operand, with the source is operated with.
icl64f getValue () const
 returns the value of the second operand
void setOpType (optype t)
 changes the operator type
optype getOpType () const
 returns the operator type

Private Attributes

optype m_eOpType
icl64f m_dValue

Detailed Description

Class for Arithmetic Functions.

(nearly all functions: Img8u, Img16s, Img32f: IPP + Fallback, all other Types: Fallback only!) The functions AddC, SubC, MulC, DivC, AbsDiff, Sqr, Sqrt, Ln, Exp, Abs are implemented for: Img8u IPP+Fallback Img16s IPP+Fallback Img32f IPP+Fallback Img32s Fallback only Img64f Fallback only The user have to take care about overflows. For example 255+1=0 on icl8u


Member Enumeration Documentation

this enum specifiy all possible binary arithmetical operations

Enumerator:
addOp 

add a constant value to each pixel

subOp 

substract a constant value from each pixel

mulOp 

multiply each pixel by a constant value

divOp 

divide each pixle through a constant value

sqrOp 

squares each pixel

sqrtOp 

calculates the square root of each pixel

lnOp 

calculates the natural logarithm of each pixel

expOp 

calculates the exponential function for each pixel

absOp 

calculates the absolute value for each pixel


Constructor & Destructor Documentation

Constructor.

Destructor.


Member Function Documentation

virtual void icl::filter::UnaryArithmeticalOp::apply ( const core::ImgBase poSrc,
core::ImgBase **  ppoDst 
) [virtual]

performes the arithmetical operation, given in the constructor or by the setOpType method.

Parameters:
poSrcfirst operand (image)
ppoDstdestination image, to store the result

Implements icl::filter::UnaryOp.

returns the operator type

See also:
optype
Returns:
operator type

returns the value of the second operand

Returns:
the value of the second operand

changes the operator type

See also:
optype
Parameters:
toperator type

sets the second operand, with the source is operated with.

Parameters:
valuethe value for the operand

Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines