IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
PCAReductionImgLvl1.h
1 // PCAReductionImgLvl1.h:
3 // ----------------------
4 //
14 
15 #ifndef __IPSDKIPLCLASSIFICATION_PCAREDUCTIONIMGLVL1_H__
16 #define __IPSDKIPLCLASSIFICATION_PCAREDUCTIONIMGLVL1_H__
17 
21 #include <IPSDKIPL/IPSDKIPLClassification/Rule/PCAReductionRuleUtils.h>
22 
23 // Attributes headers
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptPCAReductionParams.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/OutPCAEigenValues.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/OutPCAEigenVectors.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/InHomogeneousImg.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Optional/OutOptSeqImg.h>
29 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/OutPCAMatrixRank.h>
30 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/Optional/InOptSingleGreyMaskImg.h>
31 
32 namespace ipsdk {
33 namespace imaproc {
34 namespace classif {
35 
36 class PCADecompositionLvl1;
37 
40 
41 // declare processor class
42 IPSDK_DECLARE_LVL1_PROCESSOR(ASYNC2, IPSDKIPLClassification, PCAReductionImg,
43  ipsdk::processor::ifIsSet(_pOutOptSeqImg,
44  ipsdk::imaproc::matchSize(eMatchImageSizeType::eMIST_3d, _pInHomogeneousImg, _pOutOptSeqImg) &&
45  ipsdk::processor::If(ipsdk::processor::isSet(_pInOptPCAReductionParams),
46  ipsdk::processor::isEqual<attr::PCAReductionParams::Criterion>(_pInOptPCAReductionParams, attr::ePCAReductionCriterion::ePCARC_ExpectedNbEltsInSequence) &&
47  matchSize<attr::PCAReductionParams::NbExpectedElementsInSequence>(eMatchImageSizeType::eMIST_T, eMatchImageSizeScale::eMISS_FullSize, _pOutOptSeqImg, _pInOptPCAReductionParams),
48  img1SizeTLowerEqualImg2SizeCSizeTProduct(_pInHomogeneousImg, _pOutOptSeqImg))) &&
49  ipsdk::processor::If(ipsdk::processor::isSet(_pInOptPCAReductionParams) && ipsdk::processor::isEqual<attr::PCAReductionParams::Criterion>(_pInOptPCAReductionParams, attr::ePCAReductionCriterion::ePCARC_ExpectedNbEltsInSequence),
50  expectedEltInOutSeqLowerEqualInImgSizeCSizeTProduct(_pInHomogeneousImg, _pInOptPCAReductionParams),
52  ipsdk::processor::ifIsSet(_pInOptSingleGreyMaskImg,
53  ipsdk::imaproc::matchSize(eMatchImageSizeType::eMIST_3d, _pInHomogeneousImg, _pInOptSingleGreyMaskImg)),
54  (((ipsdk)(imaproc)(attr))(InHomogeneousImg))
55  (((ipsdk)(imaproc)(attr))(InOptSingleGreyMaskImg))
56  (((ipsdk)(imaproc)(attr))(InOptPCAReductionParams))
57  (((ipsdk)(imaproc)(attr))(OutOptSeqImg))
58  (((ipsdk)(imaproc)(attr))(OutPCAEigenValues)(ipsdk::processor::allocate))
59  (((ipsdk)(imaproc)(attr))(OutPCAEigenVectors)(ipsdk::processor::allocate))
60  (((ipsdk)(imaproc)(attr))(OutPCAMatrixRank)))
61 
62 // methods
63 public:
64 
65 protected:
66  processor::RetrievalResult provideProcessor(
67  const boost::shared_ptr<core::BaseAction>& pProcessor,
68  const core::BasePriority& priority,
69  core::ActionProviderPtr& pProvider);
70 
71 // attributes
72 protected:
73  boost::shared_ptr<PCADecompositionLvl1> _pDecompositionProcessor;
74 };
75 
78 
79 } // end of namespace classif
80 } // end of namespace imaproc
81 } // end of namespace ipsdk
82 
83 #endif // __IPSDKIPLCLASSIFICATION_PCAREDUCTIONIMGLVL1_H__
ProcessingResult< eRetrievalResultType > RetrievalResult
#define IPSDK_DECLARE_LVL1_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
IPSDKBASEPROCESSING_API RulePtr none()
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.
processor::OutputInitializerPtr allocate(const boost::weak_ptr< OutputAttributeType > &pOutputAttribute)
boost::enable_if_c< AttributeType::g_bOptional, RulePtr >::type isSet(const boost::shared_ptr< AttributeType > &pAttribute)
boost::shared_ptr< BaseActionProvider > ActionProviderPtr
expected dimensionality of output sequence image
Definition: PCAReductionCriteria.h:35
IPSDKBASEPROCESSING_API RulePtr If(const RulePtr &pPredicate, const RulePtr &pRuleTrue)