IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
SobelGradient3dImgLvl1.h
1 // SobelGradient3dImgLvl1.h:
3 // ----------------------------
4 //
14 
15 #ifndef __IPSDKIPLFILTERING_SOBELGRADIENT3DIMGLVL1_H__
16 #define __IPSDKIPLFILTERING_SOBELGRADIENT3DIMGLVL1_H__
17 
23 
24 // Attributes headers
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Enumerate/InOptSobelKernelType.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/3d/InImg3d.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/3d/Optional/OutOptGradXImg3d.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/3d/Optional/OutOptGradYImg3d.h>
29 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/3d/Optional/OutOptGradZImg3d.h>
30 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InOptNormalizeSobelKernel.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, SobelGradient3dImg,
41  ((ipsdk::processor::isSet(_pOutOptGradXImg3d) || ipsdk::processor::isSet(_pOutOptGradYImg3d) || ipsdk::processor::isSet(_pOutOptGradZImg3d)) &&
42  (ipsdk::processor::ifIsSet(_pOutOptGradXImg3d,
43  ipsdk::imaproc::matchSize(_pInImg3d, _pOutOptGradXImg3d))) &&
44  (ipsdk::processor::ifIsSet(_pOutOptGradYImg3d,
45  ipsdk::imaproc::matchSize(_pInImg3d, _pOutOptGradYImg3d))) &&
46  (ipsdk::processor::ifIsSet(_pOutOptGradZImg3d,
47  ipsdk::imaproc::matchSize(_pInImg3d, _pOutOptGradZImg3d)))),
48  (((ipsdk)(imaproc)(attr))(InImg3d))
49  (((ipsdk)(imaproc)(attr))(InOptSobelKernelType))
50  (((ipsdk)(imaproc)(attr))(InOptNormalizeSobelKernel))
51  (((ipsdk)(imaproc)(attr))(OutOptGradXImg3d)(promoteUnary)(_pInImg3d)(ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperSigned))
52  (((ipsdk)(imaproc)(attr))(OutOptGradYImg3d)(promoteUnary)(_pInImg3d)(ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperSigned))
53  (((ipsdk)(imaproc)(attr))(OutOptGradZImg3d)(promoteUnary)(_pInImg3d)(ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperSigned)))
54 
55 // methods
56 public:
57 
58 protected:
62 
64  ipsdk::processor::RetrievalResult retrieveXGradXDerivationProvider(const ipsdk::core::BasePriority& priority,
66 
68  ipsdk::processor::RetrievalResult retrieveXGradYSmoothingProvider(const ipsdk::core::BasePriority& priority,
70 
72  ipsdk::processor::RetrievalResult retrieveXGradZSmoothingProvider(const ipsdk::core::BasePriority& priority,
74 
76  ipsdk::processor::RetrievalResult retrieveYGradXSmoothingProvider(const ipsdk::core::BasePriority& priority,
78 
80  ipsdk::processor::RetrievalResult retrieveYGradYDerivationProvider(const ipsdk::core::BasePriority& priority,
82 
84  ipsdk::processor::RetrievalResult retrieveYGradZSmoothingProvider(const ipsdk::core::BasePriority& priority,
86 
88  ipsdk::processor::RetrievalResult retrieveZGradXSmoothingProvider(const ipsdk::core::BasePriority& priority,
90 
92  ipsdk::processor::RetrievalResult retrieveZGradYSmoothingProvider(const ipsdk::core::BasePriority& priority,
94 
96  ipsdk::processor::RetrievalResult retrieveZGradZDerivationProvider(const ipsdk::core::BasePriority& priority,
98 
100  void clearIntermediateData();
101 
102 // attributes
103 protected:
106  KernelXYZPtr _pXSmoothingKernel;
107  KernelXYZPtr _pYSmoothingKernel;
108  KernelXYZPtr _pZSmoothingKernel;
109  KernelXYZPtr _pXGradientKernel;
110  KernelXYZPtr _pYGradientKernel;
111  KernelXYZPtr _pZGradientKernel;
113 
114  // border policy used for convolution
115  image::Border3dPolicyPtr _pBorder3dPolicy;
116 };
117 
120 
121 } // end of namespace filter
122 } // end of namespace imaproc
123 } // end of namespace ipsdk
124 
125 #endif // __IPSDKIPLFILTERING_SOBELGRADIENT3DIMGLVL1_H__
boost::shared_ptr< Border3dPolicy > Border3dPolicyPtr
#define IPSDK_DECLARE_LVL1_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
processor::OutputInitializerPtr promoteUnary(const boost::weak_ptr< OutputAttributeType > &pOutputAttribute, const boost::weak_ptr< InputAttributeType > &pInputAttribute, const ePromoteUnaryType &promoteUnaryType)
ePUT_UpperSigned
boost::shared_ptr< KernelXYZ > KernelXYZPtr
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::enable_if_c< AttributeType::g_bOptional, RulePtr >::type isSet(const boost::shared_ptr< AttributeType > &pAttribute)
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
Definition of import/export macro for library.