IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
MatchHistograms2dImgLvl1.h
1 // MatchHistograms2dImgLvl1.h:
3 // -------------------------
4 //
14 
15 #ifndef __IPSDKIPLINTENSITYTRANSFORM_MATCHHISTOGRAMS2DIMGLVL1_H__
16 #define __IPSDKIPLINTENSITYTRANSFORM_MATCHHISTOGRAMS2DIMGLVL1_H__
17 
21 
22 // Attributes headers
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptPIHistoMsrParams.h>
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptPIRefHistogram.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/InImg.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/Optional/InOptRefImg.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/OutImg.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/DataItem/PlanIndexedHistogramData.h>
29 #include <IPSDKIPL/IPSDKIPLAttributes/DataItem/PlanIndexedIntensityLUT.h>
30 
31 namespace ipsdk {
32 namespace imaproc {
33 namespace itrans {
34 
37 
38 // declare processor class
39 IPSDK_DECLARE_LVL1_PROCESSOR(REP_ASYNC1, IPSDKIPLIntensityTransform, MatchHistograms2dImg,
40  ipsdk::imaproc::matchSize(_pInImg, _pOutImg) &&
42  ipsdk::processor::Not(ipsdk::processor::isSet(_pInOptPIRefHistogram)) &&
43  ((ipsdk::imaproc::is2d(_pInOptRefImg) && ipsdk::imaproc::isGrey(_pInOptRefImg) && ipsdk::imaproc::isSingle(_pInOptRefImg)) ||
44  ipsdk::imaproc::matchSize(eMatchImageSizeType::eMIST_ZCT, _pInImg, _pInOptRefImg)),
45  ipsdk::processor::isSet(_pInOptPIRefHistogram) &&
46  ((ipsdk::imaproc::is2d(_pInOptPIRefHistogram) && ipsdk::imaproc::isGrey(_pInOptPIRefHistogram) && ipsdk::imaproc::isSingle(_pInOptPIRefHistogram)) ||
47  ipsdk::imaproc::matchImagePlans(_pInOptPIRefHistogram, _pInImg, eImagePlansMatchPolicy::eIPMP_ZCT))) &&
48  ipsdk::processor::ifIsSet(_pInOptPIHistoMsrParams,
49  ((ipsdk::imaproc::is2d(_pInOptPIHistoMsrParams) && ipsdk::imaproc::isGrey(_pInOptPIHistoMsrParams) && ipsdk::imaproc::isSingle(_pInOptPIHistoMsrParams)) ||
50  ipsdk::imaproc::matchImagePlans(_pInOptPIHistoMsrParams, _pInImg, eImagePlansMatchPolicy::eIPMP_ZCT))),
51  (((ipsdk)(imaproc)(attr))(InImg))
52  (((ipsdk)(imaproc)(attr))(InOptRefImg))
53  (((ipsdk)(imaproc)(attr))(InOptPIRefHistogram))
54  (((ipsdk)(imaproc)(attr))(InOptPIHistoMsrParams))
55  (((ipsdk)(imaproc)(attr))(OutImg)(ipsdk::imaproc::duplicateInOut)(_pInImg)))
56 
57 // methods
58 public:
59 
60 protected:
61  processor::RetrievalResult provideProcessor(const boost::shared_ptr<core::BaseAction>& pProcessor,
62  const core::BasePriority& priority,
63  core::ActionProviderPtr& pProvider);
64 
66  const core::BasePriority& priority,
67  core::ActionProviderPtr& pProvider,
68  const ipsdk::image::ImageConstPtr& pInImg,
70  bool bIgnoreHistoMsrParams);
71 
72  processor::RetrievalResult matchHisto(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
73  processor::RetrievalResult lutTransform(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
74 
75 // attributes
76 protected:
81 };
82 
85 
86 } // end of namespace itrans
87 } // end of namespace imaproc
88 } // end of namespace ipsdk
89 
90 #endif // __IPSDKIPLINTENSITYTRANSFORM_MATCHHISTOGRAMS2DIMGLVL1_H__
ProcessingResult< eRetrievalResultType > RetrievalResult
#define IPSDK_DECLARE_LVL1_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
IPSDKBASEPROCESSING_API RulePtr Not(const RulePtr &pRule)
processor::OutputInitializerPtr duplicateInOut(const boost::weak_ptr< OutputAttributeType > &pOutputAttribute, const boost::weak_ptr< InputAttributeType > &pInputAttribute, const eImageInitializerStoragePolicy &storagePolicy=eImageInitializerStoragePolicy::eIISP_Inherit)
boost::enable_if_c< AttributeType::g_bOptional, RulePtr >::type ifIsSet(const boost::shared_ptr< AttributeType > &pAttribute, const RulePtr &pRuleTrue)
Definition of import/export macro for library.
boost::shared_ptr< const BaseImage > ImageConstPtr
boost::enable_if_c< AttributeType::g_bOptional, RulePtr >::type isSet(const boost::shared_ptr< AttributeType > &pAttribute)
boost::shared_ptr< BaseActionProvider > ActionProviderPtr
boost::shared_ptr< ipsdk::imaproc::attr::PlanIndexedIntensityLUT > PlanIndexedIntensityLUTPtr
shared pointer to ipsdk::imaproc::attr::PlanIndexedIntensityLUT
Definition: PlanIndexedIntensityLUT.h:49
boost::shared_ptr< ipsdk::imaproc::attr::PlanIndexedHistogramData > PlanIndexedHistogramDataPtr
shared pointer to ipsdk::imaproc::attr::PlanIndexedHistogramData
Definition: PlanIndexedHistogramData.h:49
IPSDKBASEPROCESSING_API RulePtr If(const RulePtr &pPredicate, const RulePtr &pRuleTrue)