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

Class for comparing two images pixel-wise. More...

#include <BinaryCompareOp.h>

Inheritance diagram for icl::filter::BinaryCompareOp:
icl::filter::BinaryOp

List of all members.

Public Types

enum  optype {
  lt = ippCmpLess, lteq = ippCmpLessEq, eq = ippCmpEq, gteq = ippCmpGreaterEq,
  gt = ippCmpGreater, eqt
}
 this enum specifiy all possible compare operations More...

Public Member Functions

 BinaryCompareOp (optype ot, icl64f tolerance=0)
 creates a new BinaryCompareOp object with given optype and tolerance level
virtual ~BinaryCompareOp ()
 Destructor.
virtual void apply (const core::ImgBase *poSrc1, const core::ImgBase *poSrc2, core::ImgBase **ppoDst)
 applies this compare operation to two source images into the given destination image
optype getOpType () const
 returns the current optype
icl64f getTolerance () const
 returns the current tolerance level
void setOpType (optype ot)
 sets the current opttype
void setTolerance (icl64f tolerance)
 sets the current tolerance level

Private Attributes

optype m_eOpType
 internal storage for the current optype
icl64f m_dTolerance

Detailed Description

Class for comparing two images pixel-wise.

Compares pixel values of two images using a specified compare operation. The result is written to a binarized image of type Img8u. If the result of the comparison is true, the corresponding output pixel is set to 255; otherwise, it is set to 0.


Member Enumeration Documentation

this enum specifiy all possible compare operations

Enumerator:
lt 

"<"- relation

lteq 

"<="-relation

eq 

"=="-relation

gteq 

">="-relation

gt 

">" -relation

eqt 

"=="-relation using a given tolerance level


Constructor & Destructor Documentation

icl::filter::BinaryCompareOp::BinaryCompareOp ( optype  ot,
icl64f  tolerance = 0 
) [inline]

creates a new BinaryCompareOp object with given optype and tolerance level

Parameters:
otoptype to use
tolerancetolerance level to use
virtual icl::filter::BinaryCompareOp::~BinaryCompareOp ( ) [inline, virtual]

Destructor.


Member Function Documentation

virtual void icl::filter::BinaryCompareOp::apply ( const core::ImgBase poSrc1,
const core::ImgBase poSrc2,
core::ImgBase **  ppoDst 
) [virtual]

applies this compare operation to two source images into the given destination image

Parameters:
poSrc1first source image
poSrc2second source image
ppoDstdestination image

Implements icl::filter::BinaryOp.

returns the current optype

Returns:
current optype

returns the current tolerance level

Returns:
current tolerance level

sets the current opttype

Parameters:
otnew optype
void icl::filter::BinaryCompareOp::setTolerance ( icl64f  tolerance) [inline]

sets the current tolerance level

Parameters:
tolerancenew tolerance level

Member Data Documentation

internal storage for the current optype


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