IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
RemoveBorder2dImgLvl1.h
1 // RemoveBorder2dImgLvl1.h:
3 // ------------------------
4 //
14 
15 #ifndef __IPSDKIPLADVANCEDMORPHOLOGY_REMOVEBORDER2DIMGLVL1_H__
16 #define __IPSDKIPLADVANCEDMORPHOLOGY_REMOVEBORDER2DIMGLVL1_H__
17 
21 
22 // Attributes headers
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/InBinLabImg.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, RemoveBorder2dImg,
39  ((ipsdk::imaproc::matchSizeAndType(_pInBinLabImg, _pOutImg)) &&
40  (ipsdk::processor::ifIsSet(_pOutOptWk1BinImg,
41  (ipsdk::imaproc::matchSize(_pInBinLabImg, _pOutOptWk1BinImg)))) &&
42  (ipsdk::processor::ifIsSet(_pOutOptWk1LabelImg,
43  (ipsdk::imaproc::matchSize(_pInBinLabImg, _pOutOptWk1LabelImg))))),
44  (((ipsdk)(imaproc)(attr))(InBinLabImg))
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)(_pInBinLabImg)))
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 markBorder(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
67  processor::RetrievalResult removeLabelBorder(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 
71 // attributes
72 protected:
74  image::ImagePtr _pUsedImg;
75 };
76 
79 
80 } // end of namespace advmorpho
81 } // end of namespace imaproc
82 } // end of namespace ipsdk
83 
84 #endif // __IPSDKIPLADVANCEDMORPHOLOGY_REMOVEBORDER2DIMGLVL1_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