IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
MatchHistograms3dImgLvl1.h
1 // MatchHistograms3dImgLvl1.h:
3 // -------------------------
4 //
14 
15 #ifndef __IPSDKIPLINTENSITYTRANSFORM_MATCHHISTOGRAMS3DIMGLVL1_H__
16 #define __IPSDKIPLINTENSITYTRANSFORM_MATCHHISTOGRAMS3DIMGLVL1_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/3d/InImg3d.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, MatchHistograms3dImg,
40  ipsdk::imaproc::matchSize(_pInImg3d, _pOutImg) &&
42  ipsdk::processor::Not(ipsdk::processor::isSet(_pInOptPIRefHistogram)) &&
43  ((ipsdk::imaproc::isGrey(_pInOptRefImg) && ipsdk::imaproc::isSingle(_pInOptRefImg)) ||
44  ipsdk::imaproc::matchSize(eMatchImageSizeType::eMIST_CT, _pInImg3d, _pInOptRefImg)),
45  ipsdk::processor::isSet(_pInOptPIRefHistogram) &&
46  ipsdk::imaproc::is2d(_pInOptPIRefHistogram) &&
47  ((ipsdk::imaproc::isGrey(_pInOptPIRefHistogram) && ipsdk::imaproc::isSingle(_pInOptPIRefHistogram)) ||
48  ipsdk::imaproc::matchImagePlans(_pInOptPIRefHistogram, _pInImg3d, eImagePlansMatchPolicy::eIPMP_CT))) &&
49  ipsdk::processor::ifIsSet(_pInOptPIHistoMsrParams,
50  ipsdk::imaproc::is2d(_pInOptPIHistoMsrParams) &&
51  ((ipsdk::imaproc::isGrey(_pInOptPIHistoMsrParams) && ipsdk::imaproc::isSingle(_pInOptPIHistoMsrParams)) ||
52  ipsdk::imaproc::matchImagePlans(_pInOptPIHistoMsrParams, _pInImg3d, eImagePlansMatchPolicy::eIPMP_CT))),
53  (((ipsdk)(imaproc)(attr))(InImg3d))
54  (((ipsdk)(imaproc)(attr))(InOptRefImg))
55  (((ipsdk)(imaproc)(attr))(InOptPIRefHistogram))
56  (((ipsdk)(imaproc)(attr))(InOptPIHistoMsrParams))
57  (((ipsdk)(imaproc)(attr))(OutImg)(ipsdk::imaproc::duplicateInOut)(_pInImg3d)))
58 
59 // methods
60 public:
61 
62 protected:
63  processor::RetrievalResult provideProcessor(const boost::shared_ptr<core::BaseAction>& pProcessor,
64  const core::BasePriority& priority,
65  core::ActionProviderPtr& pProvider);
66 
67  processor::RetrievalResult histoMsr(const core::BasePriority& priority, core::ActionProviderPtr& pProvider, const ipsdk::image::ImageConstPtr& pInImg, const ipsdk::imaproc::attr::PlanIndexedHistogramDataPtr& pPIHisto, bool bIgnoreHistoMsrParams);
68  processor::RetrievalResult matchHisto(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
69  processor::RetrievalResult lutTransform(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
70 
71 // attributes
72 protected:
77 };
78 
81 
82 } // end of namespace itrans
83 } // end of namespace imaproc
84 } // end of namespace ipsdk
85 
86 #endif // __IPSDKIPLINTENSITYTRANSFORM_MATCHHISTOGRAMS3DIMGLVL1_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)