IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
FillHole2dImgLvl1.h
1 // FillHole2dImgLvl1.h:
3 // --------------------
4 //
14 
15 #ifndef __IPSDKIPLADVANCEDMORPHOLOGY_FILLHOLE2DIMGLVL1_H__
16 #define __IPSDKIPLADVANCEDMORPHOLOGY_FILLHOLE2DIMGLVL1_H__
17 
21 
22 // Attributes headers
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/InBinImg.h>
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Neighborhood/InOptNeighborhood2d.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Enumerate/InOptOptimizationPolicy.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/Optional/OutOptWk1BinImg.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/Optional/OutOptWk1LabelImg.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/OutImg.h>
29 
30 namespace ipsdk {
31 namespace imaproc {
32 namespace advmorpho {
33 
36 
37 // declare processor class
38 IPSDK_DECLARE_LVL1_PROCESSOR(REP_ASYNC1, IPSDKIPLAdvancedMorphology, FillHole2dImg,
39  ((ipsdk::imaproc::matchSizeAndType(_pInBinImg, _pOutImg)) &&
40  (ipsdk::processor::ifIsSet(_pOutOptWk1BinImg,
41  (ipsdk::imaproc::matchSize(_pInBinImg, _pOutOptWk1BinImg)))) &&
42  (ipsdk::processor::ifIsSet(_pOutOptWk1LabelImg,
43  (ipsdk::imaproc::matchSize(_pInBinImg, _pOutOptWk1LabelImg))))),
44  (((ipsdk)(imaproc)(attr))(InBinImg))
45  (((ipsdk)(imaproc)(attr))(InOptNeighborhood2d))
46  (((ipsdk)(imaproc)(attr))(InOptOptimizationPolicy))
47  (((ipsdk)(imaproc)(attr))(OutOptWk1BinImg))
48  (((ipsdk)(imaproc)(attr))(OutOptWk1LabelImg))
49  (((ipsdk)(imaproc)(attr))(OutImg)(ipsdk::imaproc::duplicateInOut)(_pInBinImg)))
50 
51 // methods
52 public:
53 
54 protected:
58 
60  void clearIntermediateData();
61 
62  processor::RetrievalResult provideProcessor(const boost::shared_ptr<core::BaseAction>& pProcessor,
63  const core::BasePriority& priority,
64  core::ActionProviderPtr& pProvider);
65 
66  processor::RetrievalResult logicalNot(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
67  processor::RetrievalResult markBorder(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
68  processor::RetrievalResult maxPropagation(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
69  processor::RetrievalResult threshold(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
70  processor::RetrievalResult bitwiseOr(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
71 
72 // attributes
73 protected:
75  image::ImagePtr _pUsedImg;
76 };
77 
80 
81 } // end of namespace advmorpho
82 } // end of namespace imaproc
83 } // end of namespace ipsdk
84 
85 #endif // __IPSDKIPLADVANCEDMORPHOLOGY_FILLHOLE2DIMGLVL1_H__
Definition of import/export macro for library.
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::enable_if_c< AttributeType::g_bOptional, RulePtr >::type ifIsSet(const boost::shared_ptr< AttributeType > &pAttribute, const RulePtr &pRuleTrue)
boost::shared_ptr< BaseActionProvider > ActionProviderPtr
IPSDK_DECLARE_GPU_PROCESSING_ALGORITHM(IPSDKIPLFiltering, Convolution2dImg, ipsdk::imaproc::matchSize(_pInSubGpuImg, _pOutImg),(((ipsdk)(imaproc)(attr))(InSubGpuImg))(((ipsdk)(imaproc)(attr))(InKnlXY))(((ipsdk)(imaproc)(attr))(InNormalize))(((ipsdk)(imaproc)(attr))(InConvolBorder2d))(((ipsdk)(imaproc)(attr))(OutImg))) IPSDKCUDA_DECLARE_ALGORITHM_FUNCTION_SELECTOR((InSubGpuImg)(OutImg)) public void clearIntermediateData()
method called before processing
IPSDK_FORCEINLINE PackT bitwiseOr(const PackT &in1, const PackT &in2)