IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
VolumePercent3dMsrLvl3.h
1 // VolumePercent3dMsrLvl3.h:
3 // -------------------------
4 //
14 
15 #ifndef __IPSDKIPLGLOBALMEASURE_VOLUMEPERCENT3DMSRLVL3_H__
16 #define __IPSDKIPLGLOBALMEASURE_VOLUMEPERCENT3DMSRLVL3_H__
17 
20 
21 // Attributes headers
22 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/OutValues.h>
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/ZStrip3d/InBinLabZStrip3d.h>
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/ZStrip3d/InOptMaskZStrip3d.h>
25 
26 namespace ipsdk {
27 namespace imaproc {
28 namespace glbmsr {
29 
32 
33 // declare processing algorithm
34 IPSDK_DECLARE_PROCESSING_ALGORITHM(IPSDKIPLGlobalMeasure, VolumePercent3dMsr,
35  ipsdk::processor::If(ipsdk::processor::isSet(_pInOptMaskZStrip3d),
36  ipsdk::imaproc::matchSize(_pInBinLabZStrip3d, _pInOptMaskZStrip3d),
38  (((ipsdk)(imaproc)(attr))(InBinLabZStrip3d))
39  (((ipsdk)(imaproc)(attr))(InOptMaskZStrip3d))
40  (((ipsdk)(imaproc)(attr))(OutValues)))
41 
42  // implementation of image processing data identifier retrieval method
43  // for function selector usage
44  IPSDK_DECLARE_ALGORITHM_FUNCTION_SELECTOR(((STRIP)(InBinLabZStrip3d)));
45 
46  // declaration of parsed data during processing
47  IPSDK_DECLARE_ALGORITHM_PARSED_DATA(((RAWSTRIP)(InBinLabZStrip3d))
48  ((RAWSTRIP)(InOptMaskZStrip3d)));
49 
50 // methods
51 public:
52 
53 protected:
56  ipsdk::core::ExecResult postProcess();
57 
58 
60  template <typename T,
61  ipsdk::eInstructionSet::domain IS>
62  ipsdk::BoolResult genericProcessFunction(const ipsdk::processor::ProcessingInfo& info);
63 
65  template <ipsdk::eInstructionSet::domain IS>
66  void processBinary(const ipsdk::processor::ProcessingInfo& info, std::vector<ipReal64>& vSum);
67 
69  template <typename T,
70  ipsdk::eInstructionSet::domain IS>
71  void processLabel(const ipsdk::processor::ProcessingInfo& info, const T* pBufIn, const ipUInt8* pBufMask, const std::vector<T>& vLabels, std::vector<ipReal64>& vSum);
72 
73 // attributes
74 protected:
76  std::vector<ipReal64> _vSum;
77 };
78 
81 
82 } // end of namespace glbmsr
83 } // end of namespace imaproc
84 } // end of namespace ipsdk
85 
86 #endif // __IPSDKIPLGLOBALMEASURE_VOLUMEPERCENT3DMSRLVL3_H__
IPSDKBASEPROCESSING_API RulePtr none()
uint8_t ipUInt8
#define IPSDK_DECLARE_PROCESSING_ALGORITHM(libraryName, algoName, RuleString, attributeSeq)
#define IPSDK_DECLARE_ALGORITHM_PARSED_DATA(dataSeq)
boost::enable_if_c< AttributeType::g_bOptional, RulePtr >::type isSet(const boost::shared_ptr< AttributeType > &pAttribute)
Definition of import/export macro for library.
#define IPSDK_DECLARE_ALGORITHM_FUNCTION_SELECTOR(dataTypeSeq)
IPSDKBASEPROCESSING_API RulePtr If(const RulePtr &pPredicate, const RulePtr &pRuleTrue)