IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Closing3dImgLvl1.h
1 // Closing3dImgLvl1.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKIPLBASICMORPHOLOGY_CLOSING3DIMGLVL1_H__
16 #define __IPSDKIPLBASICMORPHOLOGY_CLOSING3DIMGLVL1_H__
17 
22 
23 // Attributes headers
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/3d/InImg3d.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/StructuringElement/InSEXYZ.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Enumerate/InOptBorderExtensionPolicy.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/OutImg.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/Optional/OutOptWk1Img.h>
29 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Working/Optional/OutOptWk2Img.h>
30 
31 namespace ipsdk {
32 namespace imaproc {
33 namespace morpho {
34 
37 
38 // declare processor class
39 IPSDK_DECLARE_LVL1_PROCESSOR(REP_ASYNC1, IPSDKIPLBasicMorphology, Closing3dImg,
40  ((ipsdk::imaproc::matchSizeAndType(_pInImg3d, _pOutImg)) &&
41  (ipsdk::processor::ifIsSet(_pOutOptWk1Img,
42  ipsdk::imaproc::customImageProperty(_pOutOptWk1Img, matchBorderExtension1(_pInImg3d, _pInSEXYZ, _pInOptBorderExtensionPolicy)))) &&
43  (ipsdk::processor::ifIsSet(_pOutOptWk2Img,
44  ipsdk::imaproc::customImageProperty(_pOutOptWk2Img, matchBorderExtension2(_pInImg3d, _pInSEXYZ, _pInOptBorderExtensionPolicy))))),
45  (((ipsdk)(imaproc)(attr))(InImg3d))
46  (((ipsdk)(imaproc)(attr))(InSEXYZ))
47  (((ipsdk)(imaproc)(attr))(InOptBorderExtensionPolicy))
48  (((ipsdk)(imaproc)(attr))(OutOptWk1Img))
49  (((ipsdk)(imaproc)(attr))(OutOptWk2Img))
50  (((ipsdk)(imaproc)(attr))(OutImg)(ipsdk::imaproc::duplicateInOut)(_pInImg3d)))
51 
52 // methods
53 public:
54 
55 protected:
59 
60  // \brief method allowing to retrieve erosion provider associated object
61  processor::RetrievalResult retrieveErosionProvider(const core::BasePriority& priority,
62  core::ActionProviderPtr& pProvider);
63 
64  // \brief method allowing to retrieve dilation provider associated object
65  processor::RetrievalResult retrieveDilationProvider(const core::BasePriority& priority,
66  core::ActionProviderPtr& pProvider);
67 
68 
70  void clearIntermediateData();
71 
72 // attributes
73 protected:
75  image::ImageConstPtr _pUsedInImg;
76 
78  image::ImagePtr _pUsedOutImg;
79 };
80 
83 
84 } // end of namespace morpho
85 } // end of namespace imaproc
86 } // end of namespace ipsdk
87 
88 #endif // __IPSDKIPLBASICMORPHOLOGY_CLOSING3DIMGLVL1_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...