Image Component Library (ICL)
|
Abstract Base class for Unary Operators. More...
#include <UnaryOp.h>
Public Member Functions | |
UnaryOp () | |
Explicit empty constructor. | |
UnaryOp (const UnaryOp &other) | |
Explicit copy constructor. | |
UnaryOp & | operator= (const UnaryOp &other) |
Explicit declaration of the assignment operator. | |
virtual | ~UnaryOp () |
Destructor. | |
virtual void | apply (const core::ImgBase *operand1, core::ImgBase **dst)=0 |
pure virtual apply function, that must be implemented in all derived classes | |
virtual ICL_DEPRECATED void | applyMT (const core::ImgBase *operand1, core::ImgBase **dst, unsigned int nThreads) |
apply function for multithreaded filtering (currently even slower than using one thread) | |
virtual const core::ImgBase * | apply (const core::ImgBase *src) |
applys the filter usign an internal buffer as output image | |
void | operator() (const core::ImgBase *src, core::ImgBase **dst) |
function operator (alternative for apply(src,dst) | |
const core::ImgBase * | operator() (const core::ImgBase *src) |
function operator for the implicit destination apply(src) call | |
const core::ImgBase & | operator() (const core::ImgBase &src) |
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 | |
virtual void | setPropertyValue (const std::string &propertyName, const utils::Any &value) throw (utils::ICLException) |
sets value of a property (always call call_callbacks(propertyName) or Configurable::setPropertyValue) | |
Static Public Member Functions | |
static UnaryOp * | fromString (const std::string &definition) throw (utils::ICLException) |
Creates a UnaryOp instance from given string definition. | |
static std::string | getFromStringSyntax (const std::string &opSpecifier) throw (utils::ICLException) |
gives a string syntax description for given opSpecifier | |
static std::vector< std::string > | listFromStringOps () |
returns a list of all supported OP_SPEC values for the fromString function | |
static void | applyFromString (const std::string &definition, const core::ImgBase *src, core::ImgBase **dst) throw (utils::ICLException) |
creates, applies and releases a UnaryOp defined by given definition string | |
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) |
Protected Attributes | |
utils::MultiThreader * | m_poMT |
Private Member Functions | |
void | initConfigurable () |
Private Attributes | |
OpROIHandler | m_oROIHandler |
core::ImgBase * | m_buf |
Abstract Base class for Unary Operators.
A list of unary operators can be found here:
Collection of Unary Operations
Explicit empty constructor.
icl::filter::UnaryOp::UnaryOp | ( | const UnaryOp & | other | ) |
Explicit copy constructor.
virtual icl::filter::UnaryOp::~UnaryOp | ( | ) | [virtual] |
Destructor.
virtual void icl::filter::UnaryOp::apply | ( | const core::ImgBase * | operand1, |
core::ImgBase ** | dst | ||
) | [pure virtual] |
pure virtual apply function, that must be implemented in all derived classes
Implemented in icl::filter::MedianOp, icl::filter::ChamferOp, icl::filter::LUTOp3Channel< T >, icl::filter::FFTOp, icl::filter::LocalThresholdOp, icl::filter::GaborOp, icl::filter::MotionSensitiveTemporalSmoothing, icl::filter::IFFTOp, icl::filter::MorphologicalOp, icl::filter::ColorSegmentationOp, icl::filter::UnaryCompareOp, icl::filter::WarpOp, icl::filter::CannyOp, icl::filter::IntegralImgOp, icl::filter::AffineOp, icl::filter::ConvolutionOp, icl::filter::UnaryOpPipe, icl::filter::ThresholdOp, icl::filter::LUTOp, icl::filter::WeightedSumOp, icl::filter::WeightChannelsOp, icl::filter::UnaryArithmeticalOp, icl::filter::ColorDistanceOp, icl::filter::WienerOp, icl::filter::UnaryLogicalOp, and icl::filter::MirrorOp.
virtual const core::ImgBase* icl::filter::UnaryOp::apply | ( | const core::ImgBase * | src | ) | [virtual] |
applys the filter usign an internal buffer as output image
Normally, this function must not be reimplemented, because it's default implementation will call apply(const ImgBase *,ImgBase**) using an internal buffer as destination image. This destination image is returned.
Reimplemented in icl::filter::UnaryOpPipe.
static void icl::filter::UnaryOp::applyFromString | ( | const std::string & | definition, |
const core::ImgBase * | src, | ||
core::ImgBase ** | dst | ||
) | throw (utils::ICLException) [static] |
creates, applies and releases a UnaryOp defined by given definition string
virtual ICL_DEPRECATED void icl::filter::UnaryOp::applyMT | ( | const core::ImgBase * | operand1, |
core::ImgBase ** | dst, | ||
unsigned int | nThreads | ||
) | [virtual] |
apply function for multithreaded filtering (currently even slower than using one thread)
Reimplemented in icl::filter::NeighborhoodOp.
static UnaryOp* icl::filter::UnaryOp::fromString | ( | const std::string & | definition | ) | throw (utils::ICLException) [static] |
Creates a UnaryOp instance from given string definition.
Supported definitions have the followin syntax: OP_SPEC<(PARAM_LIST)>
examples are:
A complete list of OP_SPECS can be obtained by the static listFromStringOps function. Each specific parameter list's syntax is accessible using the static getFromStringSyntax function.
bool icl::filter::UnaryOp::getCheckOnly | ( | ) | const [inline] |
returns the CheckOnly status
bool icl::filter::UnaryOp::getClipToROI | ( | ) | const [inline] |
returns the ClipToROI status
static std::string icl::filter::UnaryOp::getFromStringSyntax | ( | const std::string & | opSpecifier | ) | throw (utils::ICLException) [static] |
gives a string syntax description for given opSpecifier
opSpecifier must be a member of the list returned by the static function listFromStringOps
void icl::filter::UnaryOp::initConfigurable | ( | ) | [private] |
static std::vector<std::string> icl::filter::UnaryOp::listFromStringOps | ( | ) | [static] |
returns a list of all supported OP_SPEC values for the fromString function
void icl::filter::UnaryOp::operator() | ( | const core::ImgBase * | src, |
core::ImgBase ** | dst | ||
) | [inline] |
function operator (alternative for apply(src,dst)
const core::ImgBase* icl::filter::UnaryOp::operator() | ( | const core::ImgBase * | src | ) | [inline] |
function operator for the implicit destination apply(src) call
const core::ImgBase& icl::filter::UnaryOp::operator() | ( | const core::ImgBase & | src | ) | [inline] |
reference based function operator
Explicit declaration of the assignment operator.
bool icl::filter::UnaryOp::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::UnaryOp::prepare | ( | core::ImgBase ** | ppoDst, |
const core::ImgBase * | poSrc | ||
) | [inline, protected, virtual] |
check+adapt destination image to properties of given source image
Reimplemented in icl::filter::NeighborhoodOp.
virtual bool icl::filter::UnaryOp::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
Reimplemented in icl::filter::NeighborhoodOp.
void icl::filter::UnaryOp::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.
bCheckOnly | true = destination image is only checked, false = destination image will be checked and adapted. |
void icl::filter::UnaryOp::setClipToROI | ( | bool | bClipToROI | ) | [inline] |
sets if the image should be clip to ROI or not
bClipToROI | true=yes, false=no |
virtual void icl::filter::UnaryOp::setPropertyValue | ( | const std::string & | propertyName, |
const utils::Any & | value | ||
) | throw (utils::ICLException) [virtual] |
sets value of a property (always call call_callbacks(propertyName) or Configurable::setPropertyValue)
Reimplemented from icl::utils::Configurable.
core::ImgBase* icl::filter::UnaryOp::m_buf [private] |
Reimplemented in icl::filter::IntegralImgOp.
utils::MultiThreader* icl::filter::UnaryOp::m_poMT [protected] |