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.