IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
RichardsonLucyDeblur2dImgLvl1.h
1 // RichardsonLucyDeblur2dImgLvl1.h:
3 // --------------------------------
4 //
14 
15 #ifndef __IPSDKIPLFILTERING_RICHARDSONLUCYDEBLUR2DIMGLVL1_H__
16 #define __IPSDKIPLFILTERING_RICHARDSONLUCYDEBLUR2DIMGLVL1_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/Image/Output/Working/OutWk1RealImg.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/Optional/OutOptWk1Img.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InNbIter.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InStdDevX.h>
29 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InStdDevY.h>
30 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptSmoothingGaussianCoverage.h>
31 #include <IPSDKIPL/IPSDKIPLAttributes/DataItem/StatsResult.h>
32 
33 namespace ipsdk {
34 namespace imaproc {
35 namespace filter {
36 
39 
40 // declare processor class
41 IPSDK_DECLARE_LVL1_PROCESSOR(REP_ASYNC1, IPSDKIPLFiltering, RichardsonLucyDeblur2dImg,
42  ipsdk::imaproc::matchSize(_pInImg, _pOutWk1RealImg) &&
43  ipsdk::imaproc::matchSizeAndType(_pInImg, _pOutImg) &&
44  ipsdk::imaproc::noInSitu(_pInImg, _pOutWk1RealImg) &&
45  ipsdk::imaproc::noInSitu(_pOutImg, _pOutWk1RealImg) &&
46  ipsdk::processor::ifIsSet(_pOutOptWk1Img,
47  ipsdk::imaproc::matchSizeAndType(_pInImg, _pOutOptWk1Img)),
48  (((ipsdk)(imaproc)(attr))(InImg))
49  (((ipsdk)(imaproc)(attr))(InNbIter))
50  (((ipsdk)(imaproc)(attr))(InStdDevX))
51  (((ipsdk)(imaproc)(attr))(InStdDevY))
52  (((ipsdk)(imaproc)(attr))(InOptSmoothingGaussianCoverage))
53  (((ipsdk)(imaproc)(attr))(OutImg)(ipsdk::imaproc::duplicateInOut)(_pInImg))
54  (((ipsdk)(imaproc)(attr))(OutWk1RealImg)(ipsdk::imaproc::duplicateInOut)(_pInImg)(ipsdk::image::eImageBufferType::eIBT_Real32))
55  (((ipsdk)(imaproc)(attr))(OutOptWk1Img)))
56 
57 
58 // methods
59 public:
60 
61 protected:
62  processor::RetrievalResult provideProcessor(const boost::shared_ptr<core::BaseAction>& pProcessor,
63  const core::BasePriority& priority,
64  core::ActionProviderPtr& pProvider);
65 
66  processor::RetrievalResult statsMsr(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
67  processor::RetrievalResult subtractScalar(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
68  processor::RetrievalResult copy(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
69  processor::RetrievalResult gaussSmooth(const core::BasePriority& priority, core::ActionProviderPtr& pProvider, const ipsdk::image::ImageConstPtr& pInImg);
70  processor::RetrievalResult divide(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
71  processor::RetrievalResult multiply(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
72  processor::RetrievalResult addScalar(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
73  processor::RetrievalResult histoMatch(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
74 
75 // attributes
76 protected:
78  ipUInt32 _nbIter;
79  ipReal32 _inStdDevX;
80  ipReal32 _inStdDevY;
81  attr::GaussianCoverageConstPtr _pInOptGaussianCoverage;
82  ipReal64 _minValue;
83 
85  attr::StatsResultPtr _pStatsPtr;
86  ipsdk::image::ImageConstPtr _pCurInImg;
87  ipsdk::image::ImagePtr _pCurOutImg;
88  ipsdk::image::ImagePtr _pCurWkImg;
89 
91  ipUInt32 _iterOffset;
92 
93 };
94 
97 
98 } // end of namespace filter
99 } // end of namespace imaproc
100 } // end of namespace ipsdk
101 
102 #endif // __IPSDKIPLFILTERING_RICHARDSONLUCYDEBLUR2DIMGLVL1_H__
ProcessingResult< eRetrievalResultType > RetrievalResult
IPSDK_FORCEINLINE void copy(T *dest, const T *src, ipUInt64 nbElts)
#define IPSDK_DECLARE_LVL1_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
boost::shared_ptr< BaseImage > ImagePtr
processor::OutputInitializerPtr duplicateInOut(const boost::weak_ptr< OutputAttributeType > &pOutputAttribute, const boost::weak_ptr< InputAttributeType > &pInputAttribute, const eImageInitializerStoragePolicy &storagePolicy=eImageInitializerStoragePolicy::eIISP_Inherit)
double ipReal64
boost::enable_if_c< AttributeType::g_bOptional, RulePtr >::type ifIsSet(const boost::shared_ptr< AttributeType > &pAttribute, const RulePtr &pRuleTrue)
boost::shared_ptr< const ipsdk::imaproc::attr::GaussianCoverage > GaussianCoverageConstPtr
shared pointer to const ipsdk::imaproc::attr::GaussianCoverage
Definition: GaussianCoverage.h:134
boost::shared_ptr< const BaseImage > ImageConstPtr
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
float ipReal32
uint32_t ipUInt32