Image Component Library (ICL)
Public Types | Public Member Functions | Private Attributes | List of all members
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

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 More...
 
virtual ~BinaryCompareOp ()
 Destructor. More...
 
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 More...
 
optype getOpType () const
 returns the current optype More...
 
icl64f getTolerance () const
 returns the current tolerance level More...
 
void setOpType (optype ot)
 sets the current opttype More...
 
void setTolerance (icl64f tolerance)
 sets the current tolerance level More...
 
- Public Member Functions inherited from icl::filter::BinaryOp
 BinaryOp ()
 default constructor More...
 
 BinaryOp (const BinaryOp &other)
 copy constructor More...
 
BinaryOpoperator= (const BinaryOp &other)
 assignment operator More...
 
virtual ~BinaryOp ()
 virtual destructor More...
 
virtual const core::ImgBaseapply (const core::ImgBase *operand1, const core::ImgBase *operand2)
 applyfunction without explicit destination image More...
 
void operator() (const core::ImgBase *src1, const core::ImgBase *src2, core::ImgBase **dst)
 function operator (alternative for apply(src1,src2,dst) More...
 
const core::ImgBaseoperator() (const core::ImgBase *src1, const core::ImgBase *src2)
 function operator for the implicit destination apply(a,b) call More...
 
const core::ImgBaseoperator() (const core::ImgBase &sr1, const core::ImgBase &src2)
 reference based function operator More...
 
void setClipToROI (bool bClipToROI)
 sets if the image should be clip to ROI or not More...
 
void setCheckOnly (bool bCheckOnly)
 sets if the destination image should be adapted to the source, or if it is only checked if it can be adapted. More...
 
bool getClipToROI () const
 returns the ClipToROI status More...
 
bool getCheckOnly () const
 returns the CheckOnly status More...
 

Private Attributes

optype m_eOpType
 internal storage for the current optype More...
 
icl64f m_dTolerance
 

Additional Inherited Members

- Protected Member Functions inherited from icl::filter::BinaryOp
bool prepare (core::ImgBase **ppoDst, core::depth eDepth, const utils::Size &imgSize, core::format eFormat, int nChannels, const utils::Rect &roi, utils::Time timestamp=utils::Time::null)
 
virtual bool prepare (core::ImgBase **ppoDst, const core::ImgBase *poSrc)
 check+adapt destination image to properties of given source image More...
 
virtual bool prepare (core::ImgBase **ppoDst, const core::ImgBase *poSrc, core::depth eDepth)
 
- Static Protected Member Functions inherited from icl::filter::BinaryOp
static bool check (const core::ImgBase *operand1, const core::ImgBase *operand2, bool checkDepths=true)
 

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 ( )
inlinevirtual

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.

optype icl::filter::BinaryCompareOp::getOpType ( ) const
inline

returns the current optype

Returns
current optype
icl64f icl::filter::BinaryCompareOp::getTolerance ( ) const
inline

returns the current tolerance level

Returns
current tolerance level
void icl::filter::BinaryCompareOp::setOpType ( optype  ot)
inline

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

icl64f icl::filter::BinaryCompareOp::m_dTolerance
private
optype icl::filter::BinaryCompareOp::m_eOpType
private

internal storage for the current optype


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