IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Macros
MeasureSrcMacros.h File Reference

Source part of macro set used for shape measure class implementation. More...

#include <IPSDKSerialization/Engine/SerializationSrcMacro.h>
#include <IPSDKBaseShapeAnalysis/Measure/MeasureLogMessages.h>
#include <IPSDKBaseShapeAnalysis/Logger/IPSDKBaseShapeAnalysisLog.h>
#include <boost/make_shared.hpp>

Go to the source code of this file.

Macros

#define IPSDK_IMPLEMENT_INDIVISIBLE_MEASURE(libraryName, namespaceSeq, msrName, version)
 macro allowing to implement indivisible measure
 
#define IPSDK_IMPLEMENT_GENERIC_MEASURE(libraryName, namespaceSeq, msrName, version)
 macro allowing to implement generic measure
 
#define IPSDK_IMPLEMENT_GEOMETRY2D_MEASURE(libraryName, namespaceSeq, msrName, version)
 macro allowing to implement geometry 2d measure More...
 
#define IPSDK_IMPLEMENT_GEOMETRY3D_MEASURE(libraryName, namespaceSeq, msrName, version)
 macro allowing to implement geometry 3d measure More...
 
#define IPSDK_IMPLEMENT_INTENSITY_MEASURE(libraryName, namespaceSeq, msrName, version)
 macro allowing to implement intensity measure
 

Detailed Description

Source part of macro set used for shape measure class implementation.

Author
E. Noirfalise
Date
2015/07/01

Macro Definition Documentation

◆ IPSDK_IMPLEMENT_GEOMETRY2D_MEASURE

#define IPSDK_IMPLEMENT_GEOMETRY2D_MEASURE (   libraryName,
  namespaceSeq,
  msrName,
  version 
)
Value:
IPSDK_IMPLEMENT_SERIAL_WITH_COPY(libraryName, namespaceSeq, BOOST_PP_CAT(msrName, Msr), version) \
const BOOST_PP_CAT(msrName, Msr)::MsrParamsConstStorageType& \
BOOST_PP_CAT(msrName, Msr)::getMsrParams() const { \
if (_pMsrDerivedParams.get() == 0) \
_pMsrDerivedParams = boost::static_pointer_cast<MsrParamsConstType>( \
getMeasureInfo().getMsrParams()); \
return _pMsrDerivedParams; \
} \
ipsdk::shape::analysis::MeasureResultPtr \
BOOST_PP_CAT(msrName, Msr)::startProcessingDerived(const ipsdk::ipUInt64 defaultNbColorPlans, \
const ipsdk::ipUInt64 nbEntities, \
const bool bForceNbColorPlans, \
const bool bWithIgnoredFirstElement) { \
boost::shared_ptr<MsrResultType> pMsrResults(boost::make_shared<MsrResultType>()); \
pMsrResults->init(1, nbEntities); \
return pMsrResults; \
} \
ipsdk::BoolResult \
BOOST_PP_CAT(msrName, Msr)::measureShapeDerived(const ipsdk::ipUInt64 shapeIdx, \
const ipsdk::geom::Shape2d& shape2d) { \
MsrResultType& msrResults = static_cast<MsrResultType&>(accessMeasureResult()); \
MsrResultValueType result; \
BoolResult bRes = processMeasure(shapeIdx, shape2d, result); \
if (bRes == false) \
return bRes; \
msrResults.getColl()[shapeIdx] = result; \
return true; \
}
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
#define IPSDK_IMPLEMENT_SERIAL_WITH_COPY(libraryName, namespaceSeq, className, version)
macro enabling class serialization in library class
Definition: SerializationSrcMacro.h:51

macro allowing to implement geometry 2d measure

◆ IPSDK_IMPLEMENT_GEOMETRY3D_MEASURE

#define IPSDK_IMPLEMENT_GEOMETRY3D_MEASURE (   libraryName,
  namespaceSeq,
  msrName,
  version 
)
Value:
IPSDK_IMPLEMENT_SERIAL_WITH_COPY(libraryName, namespaceSeq, BOOST_PP_CAT(msrName, Msr), version) \
const BOOST_PP_CAT(msrName, Msr)::MsrParamsConstStorageType& \
BOOST_PP_CAT(msrName, Msr)::getMsrParams() const { \
if (_pMsrDerivedParams.get() == 0) \
_pMsrDerivedParams = boost::static_pointer_cast<MsrParamsConstType>( \
getMeasureInfo().getMsrParams()); \
return _pMsrDerivedParams; \
} \
ipsdk::shape::analysis::MeasureResultPtr \
BOOST_PP_CAT(msrName, Msr)::startProcessingDerived(const ipsdk::ipUInt64 defaultNbColorPlans, \
const ipsdk::ipUInt64 nbEntities, \
const bool bForceNbColorPlans, \
const bool bWithIgnoredFirstElement) { \
boost::shared_ptr<MsrResultType> pMsrResults(boost::make_shared<MsrResultType>()); \
pMsrResults->init(1, nbEntities); \
return pMsrResults; \
} \
ipsdk::BoolResult \
BOOST_PP_CAT(msrName, Msr)::measureShapeDerived(const ipsdk::ipUInt64 shapeIdx, \
const ipsdk::geom::Shape3d& shape3d) { \
MsrResultType& msrResults = static_cast<MsrResultType&>(accessMeasureResult()); \
MsrResultValueType result; \
BoolResult bRes = processMeasure(shapeIdx, shape3d, result); \
if (bRes == false) \
return bRes; \
msrResults.getColl()[shapeIdx] = result; \
return true; \
}
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
#define IPSDK_IMPLEMENT_SERIAL_WITH_COPY(libraryName, namespaceSeq, className, version)
macro enabling class serialization in library class
Definition: SerializationSrcMacro.h:51

macro allowing to implement geometry 3d measure