IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Closing2dImgLvl1.h
1 // Closing2dImgLvl1.h:
3 // -------------------
4 //
16 
17 #ifndef __IPSDKIPLBASICMORPHOLOGY_CLOSING2DIMGLVL1_H__
18 #define __IPSDKIPLBASICMORPHOLOGY_CLOSING2DIMGLVL1_H__
19 
24 
25 // Attributes headers
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/InImg.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/StructuringElement/InSEXY.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Enumerate/InOptBorderExtensionPolicy.h>
29 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/OutImg.h>
30 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/Optional/OutOptWk1Img.h>
31 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/Optional/OutOptWk2Img.h>
32 
33 namespace ipsdk {
34 namespace imaproc {
35 namespace morpho {
36 
39 
40 // declare processor class
41 IPSDK_DECLARE_LVL1_PROCESSOR(REP_ASYNC1, IPSDKIPLBasicMorphology, Closing2dImg,
42  ((ipsdk::imaproc::matchSizeAndType(_pInImg, _pOutImg)) &&
43  (ipsdk::processor::ifIsSet(_pOutOptWk1Img,
44  ipsdk::imaproc::customImageProperty(_pOutOptWk1Img, matchBorderExtension1(_pInImg, _pInSEXY, _pInOptBorderExtensionPolicy)))) &&
45  (ipsdk::processor::ifIsSet(_pOutOptWk2Img,
46  ipsdk::imaproc::customImageProperty(_pOutOptWk2Img, matchBorderExtension2(_pInImg, _pInSEXY, _pInOptBorderExtensionPolicy))))),
47  (((ipsdk)(imaproc)(attr))(InImg))
48  (((ipsdk)(imaproc)(attr))(InSEXY))
49  (((ipsdk)(imaproc)(attr))(InOptBorderExtensionPolicy))
50  (((ipsdk)(imaproc)(attr))(OutOptWk1Img))
51  (((ipsdk)(imaproc)(attr))(OutOptWk2Img))
52  (((ipsdk)(imaproc)(attr))(OutImg)(ipsdk::imaproc::duplicateInOut)(_pInImg)))
53 
54 // methods
55 public:
56 
57 protected:
61 
62  // \brief method allowing to retrieve erosion provider associated object
63  processor::RetrievalResult retrieveErosionProvider(const core::BasePriority& priority,
64  core::ActionProviderPtr& pProvider);
65 
66  // \brief method allowing to retrieve dilation provider associated object
67  processor::RetrievalResult retrieveDilationProvider(const core::BasePriority& priority,
68  core::ActionProviderPtr& pProvider);
69 
70 
72  void clearIntermediateData();
73 
74 // attributes
75 protected:
77  image::ImageConstPtr _pUsedInImg;
78 
80  image::ImagePtr _pUsedOutImg;
81 };
82 
85 
86 } // end of namespace morpho
87 } // end of namespace imaproc
88 } // end of namespace ipsdk
89 
90 #endif // __IPSDKIPLBASICMORPHOLOGY_CLOSING2DIMGLVL1_H__
ProcessingResult< eRetrievalResultType > RetrievalResult
#define IPSDK_DECLARE_LVL1_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
Utility functions for image attribute border extension rules management.
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)
IPSDKIPLBASICMORPHOLOGY_API CustomCheckedImagePropertyPtr matchBorderExtension1(const ImageAttributeConstPtr &pInImg, const StructuringElementXYAttributeConstPtr &pSEXY, const boost::shared_ptr< const attr::InOptBorderExtensionPolicy > pInBorderExtensionPolicy)
function allowing to define rule applied on working 2d image for morphological algorithms with option...
Definition of import/export macro for library.
boost::shared_ptr< const BaseImage > ImageConstPtr
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
IPSDKIPLBASICMORPHOLOGY_API CustomCheckedImagePropertyPtr matchBorderExtension2(const ImageAttributeConstPtr &pInImg, const StructuringElementXYAttributeConstPtr &pSEXY, const boost::shared_ptr< const attr::InOptBorderExtensionPolicy > pInBorderExtensionPolicy)
function allowing to define rule applied on working 2d image for morphological algorithms with option...