IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Median2dImgLvl1.h
1 // Median2dImgLvl1.h:
3 // ------------------
4 //
14 
15 #ifndef __IPSDKIPLFILTERING_MEDIAN2DIMGLVL1_H__
16 #define __IPSDKIPLFILTERING_MEDIAN2DIMGLVL1_H__
17 
21 
22 // Attributes headers
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/InImg.h>
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/OutImg.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InHalfKnlSizeX.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InHalfKnlSizeY.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InOutOptAllow8bitsCompression.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/DataItem/StatsResult.h>
29 #include <IPSDKIPL/IPSDKIPLAttributes/DataItem/Range.h>
30 
31 namespace ipsdk {
32 namespace imaproc {
33 namespace filter {
34 
37 
38 // declare processor class
39 IPSDK_DECLARE_LVL1_PROCESSOR(REP_ASYNC1, IPSDKIPLFiltering, Median2dImg,
40  ipsdk::imaproc::matchSize(_pInImg, _pOutImg),
41  (((ipsdk)(imaproc)(attr))(InImg))
42  (((ipsdk)(imaproc)(attr))(InHalfKnlSizeX))
43  (((ipsdk)(imaproc)(attr))(InHalfKnlSizeY))
44  (((ipsdk)(imaproc)(attr))(InOutOptAllow8bitsCompression))
45  (((ipsdk)(imaproc)(attr))(OutImg)(ipsdk::imaproc::duplicateInOut)(_pInImg)))
46 
47 // methods
48 public:
49 
50 protected:
51  processor::RetrievalResult provideProcessor(const boost::shared_ptr<core::BaseAction>& pProcessor,
52  const core::BasePriority& priority,
53  core::ActionProviderPtr& pProvider);
54 
55  processor::RetrievalResult k33Median(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
56  processor::RetrievalResult k55Median(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
57  processor::RetrievalResult statsMsr(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
58  processor::RetrievalResult histoO1MedianXStrip(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
59  processor::RetrievalResult histoO1Median(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
60  processor::RetrievalResult genericMedian(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
61 
62 // attributes
63 protected:
65  ipsdk::ipBool _bNoMore;
66 
68  ipUInt32 _hlfKnlSzX;
69  ipUInt32 _hlfKnlSzY;
70 
72  attr::StatsResultPtr _pStatsPtr;
73  attr::RangePtr _pInRange;
74 };
75 
78 
79 } // end of namespace filter
80 } // end of namespace imaproc
81 } // end of namespace ipsdk
82 
83 #endif // __IPSDKIPLFILTERING_MEDIAN2DIMGLVL1_H__
ProcessingResult< eRetrievalResultType > RetrievalResult
#define IPSDK_DECLARE_LVL1_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
processor::OutputInitializerPtr duplicateInOut(const boost::weak_ptr< OutputAttributeType > &pOutputAttribute, const boost::weak_ptr< InputAttributeType > &pInputAttribute, const eImageInitializerStoragePolicy &storagePolicy=eImageInitializerStoragePolicy::eIISP_Inherit)
boost::shared_ptr< ipsdk::imaproc::attr::Range > RangePtr
shared pointer to ipsdk::imaproc::attr::Range
Definition: Range.h:153
bool ipBool
boost::shared_ptr< BaseActionProvider > ActionProviderPtr
Definition of import/export macro for library.
boost::shared_ptr< ipsdk::imaproc::attr::StatsResult > StatsResultPtr
shared pointer to ipsdk::imaproc::attr::StatsResult
Definition: StatsResult.h:206
uint32_t ipUInt32