IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
ipsdk::imaproc::shape::analysis::ArithmeticFormulaMsrInfo Class Reference

Information object for measure ArithmeticFormula. More...

#include <ArithmeticFormulaMsrInfo.h>

Inheritance diagram for ipsdk::imaproc::shape::analysis::ArithmeticFormulaMsrInfo:

Public Types

typedef ipsdk::shape::analysis::ValueMeasureResult< ipsdk::ipReal64MsrResultType
 
typedef ArithmeticFormulaMsrParams MsrParamsType
 Parameter type associated to measure.
 
typedef const ArithmeticFormulaMsrParams MsrParamsConstType
 Parameter const type associated to measure.
 
typedef boost::shared_ptr< MsrParamsTypeMsrParamsStorageType
 Shared pointer to parameter type associated to measure.
 
typedef boost::shared_ptr< MsrParamsConstTypeMsrParamsConstStorageType
 Shared pointer to const parameter type associated to measure.
 

Public Member Functions

 ~ArithmeticFormulaMsrInfo ()
 destructor
 
const std::string & getObjectName () const
 method allowing to retrieve object name
 
const std::string & getToolTip () const
 method allowing to retrieve object tooltip
 
const std::string & getDefaultName () const
 
ipsdk::shapeanalysis::eMsrProcessingPolicy getMsrProcessingPolicy () const
 

Static Public Member Functions

static const std::string & getObjectNameStr ()
 method allowing to retrieve object name
 
static const std::string & getToolTipStr ()
 method allowing to retrieve object tooltip
 
static void setFormulaDebugMode (const bool bDebugMode)
 method allowing to access to formula debug flag
 
static bool getFormulaDebugMode ()
 

Static Public Attributes

static const ipsdk::shapeanalysis::eMsrProcessingPolicy::domain g_msrProcessingPolicy = ipsdk::shapeanalysis::eMsrProcessingPolicy::eMPP_Generic
 

Protected Member Functions

 ArithmeticFormulaMsrInfo ()
 constructor
 
BoolResult validateMsrParams (const bool b2dMsrMode, const DataItemConstPtr &pMeasureParams) const
 method allowing to validate measure parameters in derived class
 
void createCustomDependencies (const bool b2dMsrMode)
 method allowing to retrieve custom dependencies informations
 

Protected Attributes

MsrParamsConstStorageType _pMsrParams
 Derived parameter associated to measure.
 

Static Protected Attributes

static bool g_bDebugMode
 formula debug flag
 

Detailed Description

Information object for measure ArithmeticFormula.

Author
E. Noirfalise
Date
2015/07/30

Arithmetic formula measure associated to a formula string

Measure synthesis :

Measure Type Measure Unit Type Parameter Type Result Type Shape Requirements
Generic.png
Generic
none.png
None
parameter.png
ArithmeticFormulaMsrParams
Value.png
Value (ipsdk::ipReal64)
none.png
None
See Shape measurement for additional information on these pictograms

Measure Type :

This is a generic measure

Measure Unit Type:

Measure ArithmeticFormula is not associated to any unit [ipsdk::shape::analysis::eMsrUnitFormat::eMUF_NoUnit]

Measure Parameter Type :

Measure ArithmeticFormula is associated to ArithmeticFormulaMsrParams parameters

Measure Result Type :

Measure ArithmeticFormula is associated to ipsdk::shape::analysis::ValueMeasureResult<ipsdk::ipReal64> results

Measure Shape Requirements :

Measure ArithmeticFormula does not requires anything from shape data

Measure Dependencies :

Measure ArithmeticFormula has no dependency

Example of C++ code :

Example informations

Associated library

IPSDKIPLShapeAnalysis

Code Example

// opening grey level input image
ImagePtr pInGreyImg2d = loadTiffImageFile(inputGreyImgPath);
// read entity shape 2d collection used for processing
Shape2dCollPtr pShape2dColl = boost::make_shared<Shape2dColl>();
readFromXmlFile(inputShape2dCollPath, *pShape2dColl);
// define a measure info set
MeasureInfoSetPtr pMeasureInfoSet = MeasureInfoSet::create2dInstance();
// create a formula which depends on Area2d and Perimeter 2d measures
// these measures will be used with respect to their default parameters
createMeasureInfo(pMeasureInfoSet, "MyFormula1", "ArithmeticFormulaMsr", createArithmeticFormulaMsrParams("PolygonArea2dMsr / Perimeter2dMsr"));
// create same formula by using a 'pre-parameterized' Area2d measure
createMeasureInfo(pMeasureInfoSet, "AreaMinusHoles", "PolygonArea2dMsr", createHolesBasicPolicyMsrParams(true));
createMeasureInfo(pMeasureInfoSet, "MyFormula2", "ArithmeticFormulaMsr", createArithmeticFormulaMsrParams("AreaMinusHoles / Perimeter2dMsr"));
// create a formula which is a combination of other formula
createMeasureInfo(pMeasureInfoSet, "MyFormula3", "ArithmeticFormulaMsr", createArithmeticFormulaMsrParams("(MyFormula1 + MyFormula2) / 2"));
// create a formula which use geometric image constants
createMeasureInfo(pMeasureInfoSet, "MyFormula4", "ArithmeticFormulaMsr", createArithmeticFormulaMsrParams("(BoundingBoxCenterXMsr - ImageCenterX) / ImageSizeX"));
// create a formula which use photometric image constants
createMeasureInfo(pMeasureInfoSet, "MyFormula5", "ArithmeticFormulaMsr", createArithmeticFormulaMsrParams("(MeanMsr - PlanMinGL) / (PlanMaxGL - PlanMinGL)"));
// compute measure on shape 2d collection
MeasureSetPtr pOutMeasureSet = shapeAnalysis2d(pInGreyImg2d, pShape2dColl, pMeasureInfoSet);
// retrieve associated results
const MeasureConstPtr& pFormula1OutMsr = pOutMeasureSet->getMeasure("MyFormula1");
const std::vector<ipReal64>& pOutResults1 = extractValueResults<ipReal64>(pFormula1OutMsr);
const MeasureConstPtr& pFormula2OutMsr = pOutMeasureSet->getMeasure("MyFormula2");
const std::vector<ipReal64>& pOutResults2 = extractValueResults<ipReal64>(pFormula2OutMsr);
const MeasureConstPtr& pFormula3OutMsr = pOutMeasureSet->getMeasure("MyFormula3");
const std::vector<ipReal64>& pOutResults3 = extractValueResults<ipReal64>(pFormula3OutMsr);
const MeasureConstPtr& pFormula4OutMsr = pOutMeasureSet->getMeasure("MyFormula4");
const std::vector<ipReal64>& pOutResults4 = extractValueResults<ipReal64>(pFormula4OutMsr);
const MeasureConstPtr& pFormula5OutMsr = pOutMeasureSet->getMeasure("MyFormula5");
const std::vector<ipReal64>& pOutResults5 = extractValueResults<ipReal64>(pFormula5OutMsr);

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