IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
RichardsonLucyDeconvolution2dImgLvl1.h
1 // RichardsonLucyDeconvolution2dImgLvl1.h:
3 // ---------------------------------------
4 //
14 
15 #ifndef __IPSDKIPLFILTERING_RICHARDSONLUCYDECONVOLUTION2DIMGLVL1_H__
16 #define __IPSDKIPLFILTERING_RICHARDSONLUCYDECONVOLUTION2DIMGLVL1_H__
17 
21 
22 // Attributes headers
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/InRealImg.h>
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/OutRealImg.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/OutWk1BinImg.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/OutWk1RealImg.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Kernel/InKnlXY.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InNbIter.h>
29 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InOptEpsilon.h>
30 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InOptSaturateOutput.h>
31 
32 namespace ipsdk {
33 namespace imaproc {
34 namespace filter {
35 
38 
39 // declare processor class
40 IPSDK_DECLARE_LVL1_PROCESSOR(REP_ASYNC1, IPSDKIPLFiltering, RichardsonLucyDeconvolution2dImg,
41  ipsdk::imaproc::matchSize(_pInRealImg, _pOutRealImg) &&
42  ipsdk::imaproc::matchSize(_pInRealImg, _pOutWk1RealImg) &&
43  ipsdk::imaproc::matchSize(_pInRealImg, _pOutWk1BinImg),
44  (((ipsdk)(imaproc)(attr))(InRealImg))
45  (((ipsdk)(imaproc)(attr))(InKnlXY))
46  (((ipsdk)(imaproc)(attr))(InNbIter))
47  (((ipsdk)(imaproc)(attr))(InOptEpsilon))
48  (((ipsdk)(imaproc)(attr))(InOptSaturateOutput))
49  (((ipsdk)(imaproc)(attr))(OutWk1BinImg)(duplicateInOut)(_pInRealImg)(ipsdk::image::eImageBufferType::eIBT_Binary))
50  (((ipsdk)(imaproc)(attr))(OutWk1RealImg)(duplicateInOut)(_pInRealImg)(ipsdk::image::eImageBufferType::eIBT_Real32))
51  (((ipsdk)(imaproc)(attr))(OutRealImg)(duplicateInOut)(_pInRealImg)(ipsdk::image::eImageBufferType::eIBT_Real32)))
52 
53 // methods
54 public:
55 
56 protected:
60 
61  processor::RetrievalResult provideProcessor(const boost::shared_ptr<core::BaseAction>& pProcessor,
62  const core::BasePriority& priority,
63  core::ActionProviderPtr& pProvider);
64 
65  processor::RetrievalResult erase(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
66  processor::RetrievalResult convolve(const core::BasePriority& priority, core::ActionProviderPtr& pProvider,
67  const ipsdk::image::ImageConstPtr& pImgToConvolve, const KernelXYConstPtr& pKnl, const ipsdk::image::ImagePtr& pConvolvedImg);
68  processor::RetrievalResult threshold(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
69  processor::RetrievalResult mask(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
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 normalize(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
73 
74 // attributes
75 protected:
76 
77  KernelXYConstPtr _pKnlXY;
78  KernelXYPtr _pKnlXY_flip;
79 
80 };
81 
84 
85 } // end of namespace filter
86 } // end of namespace imaproc
87 } // end of namespace ipsdk
88 
89 #endif // __IPSDKIPLFILTERING_RICHARDSONLUCYDECONVOLUTION2DIMGLVL1_H__
ProcessingResult< eRetrievalResultType > RetrievalResult
#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)
ipsdk::core::ExecResult preProcess()
method called before processing
boost::shared_ptr< KernelXY > KernelXYPtr
boost::shared_ptr< const BaseImage > ImageConstPtr
boost::shared_ptr< const KernelXY > KernelXYConstPtr
IPSDKBASESHAPESEGMENTATION_API void normalize(ipsdk::geom::Shape2dPolygonWithHoles &polygonWithHoles)
boost::shared_ptr< BaseActionProvider > ActionProviderPtr
Definition of import/export macro for library.