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

Abstract base class for binary image operations. More...

#include <BinaryOp.h>

Inheritance diagram for icl::filter::BinaryOp:
icl::filter::BinaryArithmeticalOp icl::filter::BinaryCompareOp icl::filter::BinaryLogicalOp icl::filter::ProximityOp

List of all members.

Public Member Functions

 BinaryOp ()
 default constructor
 BinaryOp (const BinaryOp &other)
 copy constructor
BinaryOpoperator= (const BinaryOp &other)
 assignment operator
virtual ~BinaryOp ()
 virtual destructor
virtual void apply (const core::ImgBase *operand1, const core::ImgBase *operand2, core::ImgBase **result)=0
 pure virtual apply function
virtual const core::ImgBaseapply (const core::ImgBase *operand1, const core::ImgBase *operand2)
 applyfunction without explicit destination image
void operator() (const core::ImgBase *src1, const core::ImgBase *src2, core::ImgBase **dst)
 function operator (alternative for apply(src1,src2,dst)
const core::ImgBaseoperator() (const core::ImgBase *src1, const core::ImgBase *src2)
 function operator for the implicit destination apply(a,b) call
const core::ImgBaseoperator() (const core::ImgBase &sr1, const core::ImgBase &src2)
 reference based function operator
void setClipToROI (bool bClipToROI)
 sets if the image should be clip to ROI or not
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.
bool getClipToROI () const
 returns the ClipToROI status
bool getCheckOnly () const
 returns the CheckOnly status

Protected Member Functions

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
virtual bool prepare (core::ImgBase **ppoDst, const core::ImgBase *poSrc, core::depth eDepth)

Static Protected Member Functions

static bool check (const core::ImgBase *operand1, const core::ImgBase *operand2, bool checkDepths=true)

Private Attributes

OpROIHandler m_oROIHandler
core::ImgBasem_buf
 internal image buffer which is used for the apply function without destination image argument

Detailed Description

Abstract base class for binary image operations.

A list of all binary operators can be found here:
Collection of Binary Operations


Constructor & Destructor Documentation

default constructor

copy constructor

virtual icl::filter::BinaryOp::~BinaryOp ( ) [virtual]

virtual destructor


Member Function Documentation

virtual void icl::filter::BinaryOp::apply ( const core::ImgBase operand1,
const core::ImgBase operand2,
core::ImgBase **  result 
) [pure virtual]
virtual const core::ImgBase* icl::filter::BinaryOp::apply ( const core::ImgBase operand1,
const core::ImgBase operand2 
) [virtual]

applyfunction without explicit destination image

Usually this function must not be reimplemented, because it's default operation does simply use an internal buffer to call apply(const ImgBase*,const ImgBase*,ImgBase**).

static bool icl::filter::BinaryOp::check ( const core::ImgBase operand1,
const core::ImgBase operand2,
bool  checkDepths = true 
) [inline, static, protected]
bool icl::filter::BinaryOp::getCheckOnly ( ) const [inline]

returns the CheckOnly status

Returns:
true=CheckOnly is enable, false=CheckOnly is disabled
bool icl::filter::BinaryOp::getClipToROI ( ) const [inline]

returns the ClipToROI status

Returns:
true=ClipToROI is enable, false=ClipToROI is disabled
void icl::filter::BinaryOp::operator() ( const core::ImgBase src1,
const core::ImgBase src2,
core::ImgBase **  dst 
) [inline]

function operator (alternative for apply(src1,src2,dst)

const core::ImgBase* icl::filter::BinaryOp::operator() ( const core::ImgBase src1,
const core::ImgBase src2 
) [inline]

function operator for the implicit destination apply(a,b) call

const core::ImgBase& icl::filter::BinaryOp::operator() ( const core::ImgBase sr1,
const core::ImgBase src2 
) [inline]

reference based function operator

BinaryOp& icl::filter::BinaryOp::operator= ( const BinaryOp other)

assignment operator

bool icl::filter::BinaryOp::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 
) [inline, protected]
virtual bool icl::filter::BinaryOp::prepare ( core::ImgBase **  ppoDst,
const core::ImgBase poSrc 
) [inline, protected, virtual]

check+adapt destination image to properties of given source image

virtual bool icl::filter::BinaryOp::prepare ( core::ImgBase **  ppoDst,
const core::ImgBase poSrc,
core::depth  eDepth 
) [inline, protected, virtual]

check+adapt destination image to properties of given source image but use explicitly given depth

void icl::filter::BinaryOp::setCheckOnly ( bool  bCheckOnly) [inline]

sets if the destination image should be adapted to the source, or if it is only checked if it can be adapted.

Parameters:
bCheckOnlytrue = destination image is only checked, false = destination image will be checked and adapted.
void icl::filter::BinaryOp::setClipToROI ( bool  bClipToROI) [inline]

sets if the image should be clip to ROI or not

Parameters:
bClipToROItrue=yes, false=no

Member Data Documentation

internal image buffer which is used for the apply function without destination image argument


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