IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
HistogramMsr2dLvl2.h
1 // HistogramMsr2dLvl2.h:
3 // ---------------------
4 //
14 
15 #ifndef __IPSDKIPLGLOBALMEASURE_HISTOGRAMMSR2DLVL2_H__
16 #define __IPSDKIPLGLOBALMEASURE_HISTOGRAMMSR2DLVL2_H__
17 
20 
21 // Attributes headers
22 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/OutHistogram.h>
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/SubImage/Input/2d/InSubImg2d.h>
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptHistoMsrParams.h>
25 
26 namespace ipsdk {
27 namespace imaproc {
28 namespace glbmsr {
29 
30 class StatsMsr2dLvl2;
31 
34 
35 // declare processor class
36 IPSDK_DECLARE_LVL2_PROCESSOR(ASYNC2, IPSDKIPLGlobalMeasure, HistogramMsr2d,
37  (ipsdk::processor::If(ipsdk::processor::isSet(_pInOptHistoMsrParams),
38  ipsdk::imaproc::matchImageRange<ipsdk::imaproc::attr::HistoMsrParams::Min>(_pInSubImg2d, _pInOptHistoMsrParams) &&
39  ipsdk::imaproc::matchImageRange<ipsdk::imaproc::attr::HistoMsrParams::Max>(_pInSubImg2d, _pInOptHistoMsrParams) &&
40  ipsdk::processor::isGreater<ipsdk::imaproc::attr::HistoMsrParams::BinWidth>(_pInOptHistoMsrParams, 0),
42  (((ipsdk)(imaproc)(attr))(InSubImg2d))
43  (((ipsdk)(imaproc)(attr))(InOptHistoMsrParams))
44  (((ipsdk)(imaproc)(attr))(OutHistogram)))
45 
46 // methods
47 public:
48 
49 protected:
51  processor::RetrievalResult retrieveLastProvider(const core::BasePriority& priority,
52  core::ActionProviderPtr& pProvider);
53 
56  core::ExecResult postProcess();
57 
60  ipUInt32 getHistoNbClasses(ipReal64 fMin, ipReal64 fMax, ipReal64 fBinWidth) const;
61 
63  void clearIntermediateData();
64 
65 // attributes
66 protected:
67  // declaration of dispatch results collection
68  IPSDK_DECLARE_DYNAMIC_RESULT_COLL(OutHistogram, OutHistogramColl);
69 
71  boost::shared_ptr<glbmsr::StatsMsr2dLvl2> _pStatsMsr2dLvl2;
72 };
73 
76 
77 } // end of namespace glbmsr
78 } // end of namespace imaproc
79 } // end of namespace ipsdk
80 
81 #endif // __IPSDKIPLGLOBALMEASURE_HISTOGRAMMSR2DLVL2_H__
ProcessingResult< eRetrievalResultType > RetrievalResult
#define IPSDK_DECLARE_LVL2_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
IPSDKBASEPROCESSING_API RulePtr none()
double ipReal64
ProcessingResult< eExecutionResult > ExecResult
boost::enable_if_c< AttributeType::g_bOptional, RulePtr >::type isSet(const boost::shared_ptr< AttributeType > &pAttribute)
boost::shared_ptr< BaseActionProvider > ActionProviderPtr
Definition of import/export macro for library.
IPSDK_DECLARE_GPU_PROCESSING_ALGORITHM(IPSDKIPLFiltering, Convolution2dImg, ipsdk::imaproc::matchSize(_pInSubGpuImg, _pOutImg),(((ipsdk)(imaproc)(attr))(InSubGpuImg))(((ipsdk)(imaproc)(attr))(InKnlXY))(((ipsdk)(imaproc)(attr))(InNormalize))(((ipsdk)(imaproc)(attr))(InConvolBorder2d))(((ipsdk)(imaproc)(attr))(OutImg))) IPSDKCUDA_DECLARE_ALGORITHM_FUNCTION_SELECTOR((InSubGpuImg)(OutImg)) public void clearIntermediateData()
method called before processing
#define IPSDK_DECLARE_DYNAMIC_RESULT_COLL(AttributeType, CollType)
IPSDKBASEPROCESSING_API RulePtr If(const RulePtr &pPredicate, const RulePtr &pRuleTrue)
uint32_t ipUInt32