IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
FormulaUtils.h
Go to the documentation of this file.
1 // FormulaUtils.h:
3 // ---------------
4 //
14 
15 #ifndef __IPSDKBASESHAPEANALYSIS_FORMULAUTILS_H__
16 #define __IPSDKBASESHAPEANALYSIS_FORMULAUTILS_H__
17 
23 
24 namespace ipsdk {
25 namespace shape {
26 namespace analysis {
27 
28 struct FormulaExpression;
29 struct FormulaVariableId;
30 class MeasureSet;
31 
34 
43 applyArithmeticFormula(const std::string& formulaStr,
44  const MeasureSet& measureSet,
45  const ipUInt64 cPlanIdx = 0,
46  const eMsrInputImageId& msrInputImageId = eMsrInputImageId::eMIII_Image1);
47 
59 applyArithmeticFormula(const std::string& formulaStr,
60  const MeasureSet& measureSet,
61  const ipUInt64 cPlanIdx,
62  const eMsrInputImageId& msrInputImageId,
63  Real64Vector& resultsColl);
64 
73 applyLogicFormula(const std::string& formulaStr,
74  const MeasureSet& measureSet,
75  const ipUInt64 cPlanIdx = 0,
76  const eMsrInputImageId& msrInputImageId = eMsrInputImageId::eMIII_Image1);
77 
89 applyLogicFormula(const std::string& formulaStr,
90  const MeasureSet& measureSet,
91  const ipUInt64 cPlanIdx,
92  const eMsrInputImageId& msrInputImageId,
93  BoolVector& resultsColl);
94 
97 isReservedName(const std::string& formulaVariable);
98 
100 IPSDKBASESHAPEANALYSIS_API const std::string&
101 getReservedName(const eMsrFormulaReserved& msrFormulaReserved);
102 
106 createAccessor(const BaseMeasureResult& baseMeasureResult,
107  const FormulaVariableId& variableId,
108  const ipsdk::ipUInt64 cPlanIdx,
109  ipReal64& resultValue,
110  ResultsAccessor& resultsAccessor);
111 
115 setImageConstant(const ImageConstantId& imageConstantId,
116  const ipsdk::ipUInt64 cPlanIdx,
117  const MeasureGlobalInfo& measureGlobalInfo,
118  ipReal64& csteValue);
119 
122 operator< (const ImageConstantId& id1, const ImageConstantId& id2);
123 
126 operator< (const FormulaVariableId& id1, const FormulaVariableId& id2);
127 
130 
131 } // end of namespace analysis
132 } // end of namespace shape
133 } // end of namespace ipsdk
134 
135 #endif // __IPSDKBASESHAPEANALYSIS_FORMULAUTILS_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Predefined types for shape analysis formula management.
std::vector< ipReal64 > Real64Vector
stl vector collections
Definition: BaseCollections.h:37
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
IPSDKBASESHAPEANALYSIS_API BoolVector 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
IPSDKBASESHAPEANALYSIS_API bool isReservedName(const std::string &formulaVariable)
function allowing to check whether a variable name is a reserved name
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
Definition of import/export macro for library.
IPSDKBASESHAPEANALYSIS_API Real64Vector 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
Predefined types for measure results management.
#define IPSDKBASESHAPEANALYSIS_API
Import/Export macro for library IPSDKBaseShapeAnalysis.
Definition: IPSDKBaseShapeAnalysisExports.h:25
eMsrFormulaReserved
enumerate describing formula reserved variable
Definition: FormulaTypes.h:183
IPSDKBASESHAPEANALYSIS_API BoolResult setImageConstant(const ImageConstantId &imageConstantId, const ipsdk::ipUInt64 cPlanIdx, const MeasureGlobalInfo &measureGlobalInfo, ipReal64 &csteValue)
IPSDKBASESHAPEANALYSIS_API const std::string & getReservedName(const eMsrFormulaReserved &msrFormulaReserved)
function allowing to check whether a variable name is a reserved name
boost::function1< bool, const ipUInt32 > ResultsAccessor
Accessor for measure results.
Definition: FormulaTypes.h:389
std::vector< ipBool > BoolVector
stl vector collections
Definition: BaseCollections.h:27
measure processings are associated to first image
Definition: MeasureConfigTypes.h:72
Predefined types for shape measurement operations global informations.
Predefined types for measure primary configuration.
ProcessingResult< bool > BoolResult
typedef for boolean results associated to a string description
Definition: ProcessingResultTypes.h:29
IPSDKBASESHAPEANALYSIS_API bool operator<(const ImageConstantId &id1, const ImageConstantId &id2)
image constant identifier comparison operator
IPSDKBASESHAPEANALYSIS_API BoolResult createAccessor(const BaseMeasureResult &baseMeasureResult, const FormulaVariableId &variableId, const ipsdk::ipUInt64 cPlanIdx, ipReal64 &resultValue, ResultsAccessor &resultsAccessor)
function allowing to create an accessor for formula measure dependency results
eMsrInputImageId
Enumerate allowing to identify used input image for processing.
Definition: MeasureConfigTypes.h:70