Image Component Library (ICL)
Public Types | Public Member Functions | Private Attributes | List of all members
icl::filter::BinaryArithmeticalOp Class Reference

Class for arithmetic operations performed on two images. More...

#include <BinaryArithmeticalOp.h>

Inheritance diagram for icl::filter::BinaryArithmeticalOp:
icl::filter::BinaryOp

Public Types

enum  optype {
  addOp, subOp, mulOp, divOp,
  absSubOp
}
 this enum specifiy all possible binary arithmetical operations More...
 

Public Member Functions

 BinaryArithmeticalOp (optype t)
 Constructor. More...
 
virtual ~BinaryArithmeticalOp ()
 Destructor. More...
 
virtual void apply (const core::ImgBase *poSrc1, const core::ImgBase *poSrc2, core::ImgBase **poDst)
 performes the arithmetical operation, given in the constructor or by the setOpType method. More...
 
void setOpType (optype t)
 sets the operaion that will be performed by apply More...
 
optype getOpType () const
 returns the operaion that will be performed by apply More...
 
virtual void apply (const core::ImgBase *operand1, const core::ImgBase *operand2, core::ImgBase **result)=0
 import apply symbol from parent class More...
 
virtual const core::ImgBaseapply (const core::ImgBase *operand1, const core::ImgBase *operand2)
 import apply symbol from parent class 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
 

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 arithmetic operations performed on two images.

(add, sub, mul, div) Performance notes: The functions are implemented for all 5 ICL datatypes, but only Img8u, Img16s and Img32f are IPP-accelerated!

Member Enumeration Documentation

◆ optype

this enum specifiy all possible binary arithmetical operations

Enumerator
addOp 
subOp 
mulOp 
divOp 
absSubOp 

Constructor & Destructor Documentation

◆ BinaryArithmeticalOp()

icl::filter::BinaryArithmeticalOp::BinaryArithmeticalOp ( optype  t)
inline

Constructor.

Parameters
tdefines the operaion that will be performed by apply

◆ ~BinaryArithmeticalOp()

virtual icl::filter::BinaryArithmeticalOp::~BinaryArithmeticalOp ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ apply() [1/3]

virtual void icl::filter::BinaryArithmeticalOp::apply ( const core::ImgBase poSrc1,
const core::ImgBase poSrc2,
core::ImgBase **  poDst 
)
virtual

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

Parameters
poSrc1first operand (image)
poSrc2second operand (image)
poDstpointer to the destination image, to store the result

Implements icl::filter::BinaryOp.

◆ apply() [2/3]

virtual const core::ImgBase* icl::filter::BinaryOp::apply

import apply symbol from parent class

◆ apply() [3/3]

virtual void icl::filter::BinaryOp::apply

import apply symbol from parent class

◆ getOpType()

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

returns the operaion that will be performed by apply

Returns
the operaion that will be performed by apply

◆ setOpType()

void icl::filter::BinaryArithmeticalOp::setOpType ( optype  t)
inline

sets the operaion that will be performed by apply

Parameters
tdefines the operaion that will be performed by apply

Member Data Documentation

◆ m_eOpType

optype icl::filter::BinaryArithmeticalOp::m_eOpType
private

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