Image Component Library (ICL)
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Attributes | List of all members
icl::filter::BinaryOp Class Referenceabstract

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

Public Member Functions

 BinaryOp ()
 default constructor More...
 
 BinaryOp (const BinaryOp &other)
 copy constructor More...
 
BinaryOpoperator= (const BinaryOp &other)
 assignment operator More...
 
virtual ~BinaryOp ()
 virtual destructor More...
 
virtual void apply (const core::ImgBase *operand1, const core::ImgBase *operand2, core::ImgBase **result)=0
 pure virtual apply function 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...
 

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 More...
 
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 More...
 

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

◆ BinaryOp() [1/2]

icl::filter::BinaryOp::BinaryOp ( )

default constructor

◆ BinaryOp() [2/2]

icl::filter::BinaryOp::BinaryOp ( const BinaryOp other)

copy constructor

◆ ~BinaryOp()

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

virtual destructor

Member Function Documentation

◆ apply() [1/2]

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

◆ apply() [2/2]

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**).

◆ check()

static bool icl::filter::BinaryOp::check ( const core::ImgBase operand1,
const core::ImgBase operand2,
bool  checkDepths = true 
)
inlinestaticprotected

◆ getCheckOnly()

bool icl::filter::BinaryOp::getCheckOnly ( ) const
inline

returns the CheckOnly status

Returns
true=CheckOnly is enable, false=CheckOnly is disabled

◆ getClipToROI()

bool icl::filter::BinaryOp::getClipToROI ( ) const
inline

returns the ClipToROI status

Returns
true=ClipToROI is enable, false=ClipToROI is disabled

◆ operator()() [1/3]

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)

◆ operator()() [2/3]

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

◆ operator()() [3/3]

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

reference based function operator

◆ operator=()

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

assignment operator

◆ prepare() [1/3]

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 
)
inlineprotected

◆ prepare() [2/3]

virtual bool icl::filter::BinaryOp::prepare ( core::ImgBase **  ppoDst,
const core::ImgBase poSrc 
)
inlineprotectedvirtual

check+adapt destination image to properties of given source image

◆ prepare() [3/3]

virtual bool icl::filter::BinaryOp::prepare ( core::ImgBase **  ppoDst,
const core::ImgBase poSrc,
core::depth  eDepth 
)
inlineprotectedvirtual

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

◆ setCheckOnly()

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.

◆ setClipToROI()

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

◆ m_buf

core::ImgBase* icl::filter::BinaryOp::m_buf
private

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

◆ m_oROIHandler

OpROIHandler icl::filter::BinaryOp::m_oROIHandler
private

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