![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
Measure formula syntax and usage. More...
Classes | |
| struct | ipsdk::shape::analysis::ImageConstantId |
| Formula identifier for image constant optionally associated to a color index . More... | |
| struct | ipsdk::shape::analysis::FormulaVariableId |
| Formula variable identifier optionally associated to an array and a color index . More... | |
| struct | ipsdk::shape::analysis::ImageConstant |
| Image Constant associated to an identifier and a value . More... | |
| struct | ipsdk::shape::analysis::FormulaVariable |
| Formula variable associated to an identifier and a value . More... | |
| struct | ipsdk::shape::analysis::FormulaGenericArithmeticFunctionInfo |
| Formula generic arithmetic function informations . More... | |
| struct | ipsdk::shape::analysis::FormulaCoupledArithmeticFunctionInfo |
| Formula coupled arithmetic function informations . More... | |
Typedefs | |
| typedef ProcessingResult< eFormulaEvaluationStatus > | ipsdk::shape::analysis::EvalStatus |
| formula evaluation status | |
| typedef boost::variant< ipBool, ipReal64 > | ipsdk::shape::analysis::FormulaResult |
| formula result (floating point or logical result) | |
| typedef boost::shared_ptr< ipReal64 > | ipsdk::shape::analysis::VariableValuePtr |
| shared pointer to value associated to a variable | |
| typedef std::map< ImageConstantId, VariableValuePtr > | ipsdk::shape::analysis::ConstantMap |
| map associating an image constant id to its value | |
| typedef std::map< FormulaVariableId, VariableValuePtr > | ipsdk::shape::analysis::VariableMap |
| map associating a formula variable id to its value | |
| typedef boost::shared_ptr< FormulaManager > | ipsdk::shape::analysis::FormulaManagerPtr |
| shared pointer to formula manager | |
Functions | |
| IPSDKBASESHAPEANALYSIS_API Real64Vector | ipsdk::shape::analysis::applyArithmeticFormula (const std::string &formulaStr, const MeasureSet &measureSet, const ipUInt64 cPlanIdx=0, const eMsrInputImageId &msrInputImageId=eMsrInputImageId::eMIII_Image1) |
| function allowing to apply an arithmetic formula on an existing measure set More... | |
| IPSDKBASESHAPEANALYSIS_API BoolResult | ipsdk::shape::analysis::applyArithmeticFormula (const std::string &formulaStr, const MeasureSet &measureSet, const ipUInt64 cPlanIdx, const eMsrInputImageId &msrInputImageId, Real64Vector &resultsColl) |
| function allowing to apply an arithmetic formula on an existing measure set More... | |
| IPSDKBASESHAPEANALYSIS_API BoolVector | ipsdk::shape::analysis::applyLogicFormula (const std::string &formulaStr, const MeasureSet &measureSet, const ipUInt64 cPlanIdx=0, const eMsrInputImageId &msrInputImageId=eMsrInputImageId::eMIII_Image1) |
| function allowing to apply a logic formula on an existing measure set More... | |
| IPSDKBASESHAPEANALYSIS_API BoolResult | ipsdk::shape::analysis::applyLogicFormula (const std::string &formulaStr, const MeasureSet &measureSet, const ipUInt64 cPlanIdx, const eMsrInputImageId &msrInputImageId, BoolVector &resultsColl) |
| function allowing to apply a logic formula on an existing measure set More... | |
Measure formula syntax and usage.
Measure formula are string representation of classical equations composed of elementary items :
Usage of such a formula is classically associated to two stages :
Management of measure formula is ensured by ipsdk::shape::analysis::FormulaManager.
For convenience, formula result types are restricted to two values types :
This section regroups information about used formula operators. Formula operators are described by ipsdk::shape::analysis::eMsrFormulaOperatorType enumerate.
These operators allow all classical equation combinations such as :
This section describes formula functions available with IPSDK measure formula framework.
Formula unary arithmetical functions are described by ipsdk::shape::analysis::eMsrFormulaUnaryArithmeticFunctionType enumerate.
These functions allow introduction of unary arithmetic functions into equations such as :
Formula binary arithmetical functions are described by ipsdk::shape::analysis::eMsrFormulaBinaryArithmeticFunctionType enumerate.
These functions allow introduction of binary arithmetic functions into equations such as :
Formula generic arithmetical functions are described by ipsdk::shape::analysis::eMsrFormulaGenericArithmeticFunctionType enumerate.
These functions allow introduction of arithmetic functions using variable arguments list into equations such as :
These functions can be used with one or more operands.
Formula coupled arithmetical functions are described by ipsdk::shape::analysis::eMsrFormulaCoupledArithmeticFunctionType enumerate.
These functions allow introduction of arithmetic functions using coupled variable arguments list into equations such as :
or
These functions can be used with one or more operands.
Formula ternary logical functions are described by ipsdk::shape::analysis::eMsrFormulaTernaryLogicFunctionType enumerate.
At this time a single function is available in this group
:
or
Function evaluation returns :
if
is evaluated to
boolean value
if
is evaluated to
boolean value
(and so
) value type.This section regroups information about used formula operands. Formula operands can be represented in following forms :
.
or
(logical symbols are not case sensitive)
,
) (numerical symbols are not case sensitive)This section describes color indexes as they can be used with some predefined image constant values and with variables.
Color indexes syntax must respect following the rules (in the following
is an image constant value or a variable) :
with
an unsigned integer :
with
(color channel symbols are not case sensitive) :
Formula image constant operands are described by ipsdk::shape::analysis::eMsrFormulaReserved enumerate. These constants will be replaced in equation by value extracted from used image informations.
These constants can be introduced into equations as follows :
Special constants
and
, which allows to retrieve minimum and maximum grey level values for a given image plan can be associated (if image color geometry allows it) to a color plan index :
Formula variable operands are associated to other measures. These variable names (which are not case sensitive) can refer to :
)
As described in Formula color indexes, formula variable can be associated to a color plan index. It can also be associated to a second index which will represent the array index in case of measures associated to a collection results type (ipsdk::shape::analysis::eMsrResultType::eMRT_Coll).
Array indexes syntax must respect following rule :
with
an unsigned integer and can be cumulated with color indexes :
or
. Array indexes must be valid regards to measure result array size.
Enumerate describing measure formula operation type.
Enumerate describing measure formula unary arithmetical function type.
Enumerate describing measure formula generic arithmetical function type.
enumerate describing formula reserved variable
Enumerate describing measure formula evaluation status.
| Enumerator | |
|---|---|
| eMES_Success | Measure formula evaluation is successful. |
| eMES_Warning | Measure formula evaluation is successful with warnings. |
| eMES_Failure | Measure formula evaluation failed. |
| IPSDKBASESHAPEANALYSIS_API Real64Vector ipsdk::shape::analysis::applyArithmeticFormula | ( | const std::string & | formulaStr, |
| const MeasureSet & | measureSet, | ||
| const ipUInt64 | cPlanIdx = 0, |
||
| const eMsrInputImageId & | msrInputImageId = eMsrInputImageId::eMIII_Image1 |
||
| ) |
function allowing to apply an arithmetic formula on an existing measure set
| ipsdk::shape::analysis::IPSDKBaseShapeAnalysisException | if in case of failure |
| IPSDKBASESHAPEANALYSIS_API BoolResult ipsdk::shape::analysis::applyArithmeticFormula | ( | const std::string & | formulaStr, |
| const MeasureSet & | measureSet, | ||
| const ipUInt64 | cPlanIdx, | ||
| const eMsrInputImageId & | msrInputImageId, | ||
| Real64Vector & | resultsColl | ||
| ) |
function allowing to apply an arithmetic formula on an existing measure set
| formulaStr | input used formula, must be evaluated as an arithmetic formula |
| measureSet | input measure set for used measures results |
| cPlanIdx | used color plan index for processing |
| msrInputImageId | used image for formula constant used value |
| resultsColl | output results collection |
| IPSDKBASESHAPEANALYSIS_API BoolVector ipsdk::shape::analysis::applyLogicFormula | ( | const std::string & | formulaStr, |
| const MeasureSet & | measureSet, | ||
| const ipUInt64 | cPlanIdx = 0, |
||
| const eMsrInputImageId & | msrInputImageId = eMsrInputImageId::eMIII_Image1 |
||
| ) |
function allowing to apply a logic formula on an existing measure set
| ipsdk::shape::analysis::IPSDKBaseShapeAnalysisException | if in case of failure |
| IPSDKBASESHAPEANALYSIS_API BoolResult ipsdk::shape::analysis::applyLogicFormula | ( | const std::string & | formulaStr, |
| const MeasureSet & | measureSet, | ||
| const ipUInt64 | cPlanIdx, | ||
| const eMsrInputImageId & | msrInputImageId, | ||
| BoolVector & | resultsColl | ||
| ) |
function allowing to apply a logic formula on an existing measure set
| formulaStr | input used formula, must be evaluated as a logic formula |
| measureSet | input measure set for used measures results |
| cPlanIdx | used color plan index for processing |
| msrInputImageId | used image for formula constant used value |
| resultsColl | output results collection |
1.8.14