IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
GaussianGradient3dImgLvl1.h
1 // GaussianGradient3dImgLvl1.h:
3 // ----------------------------
4 //
14 
15 #ifndef __IPSDKIPLFILTERING_GAUSSIANGRADIENT3DIMGLVL1_H__
16 #define __IPSDKIPLFILTERING_GAUSSIANGRADIENT3DIMGLVL1_H__
17 
23 
24 // Attributes headers
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/3d/InImg3d.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InStdDevX.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InStdDevY.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InStdDevZ.h>
29 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptGradientGaussianCoverage.h>
30 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/3d/Optional/OutOptGradXImg3d.h>
31 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/3d/Optional/OutOptGradYImg3d.h>
32 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/3d/Optional/OutOptGradZImg3d.h>
33 
34 namespace ipsdk {
35 namespace imaproc {
36 namespace filter {
37 
40 
41 // declare processor class
42 IPSDK_DECLARE_LVL1_PROCESSOR(REP_ASYNC1, IPSDKIPLFiltering, GaussianGradient3dImg,
43  ((ipsdk::processor::isSet(_pOutOptGradXImg3d) || ipsdk::processor::isSet(_pOutOptGradYImg3d) || ipsdk::processor::isSet(_pOutOptGradZImg3d)) &&
44  (ipsdk::processor::ifIsSet(_pOutOptGradXImg3d,
45  ipsdk::imaproc::matchSize(_pInImg3d, _pOutOptGradXImg3d))) &&
46  (ipsdk::processor::ifIsSet(_pOutOptGradYImg3d,
47  ipsdk::imaproc::matchSize(_pInImg3d, _pOutOptGradYImg3d))) &&
48  (ipsdk::processor::ifIsSet(_pOutOptGradZImg3d,
49  ipsdk::imaproc::matchSize(_pInImg3d, _pOutOptGradZImg3d)))),
50  (((ipsdk)(imaproc)(attr))(InImg3d))
51  (((ipsdk)(imaproc)(attr))(InStdDevX))
52  (((ipsdk)(imaproc)(attr))(InStdDevY))
53  (((ipsdk)(imaproc)(attr))(InStdDevZ))
54  (((ipsdk)(imaproc)(attr))(InOptGradientGaussianCoverage))
55  (((ipsdk)(imaproc)(attr))(OutOptGradXImg3d)(promoteUnary)(_pInImg3d)(ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperSigned))
56  (((ipsdk)(imaproc)(attr))(OutOptGradYImg3d)(promoteUnary)(_pInImg3d)(ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperSigned))
57  (((ipsdk)(imaproc)(attr))(OutOptGradZImg3d)(promoteUnary)(_pInImg3d)(ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperSigned)))
58 
59 // methods
60 public:
61 
62 protected:
66 
68  ipsdk::processor::RetrievalResult retrieveXGradXDerivationProvider(const ipsdk::core::BasePriority& priority,
70 
72  ipsdk::processor::RetrievalResult retrieveXGradYSmoothingProvider(const ipsdk::core::BasePriority& priority,
74 
76  ipsdk::processor::RetrievalResult retrieveXGradZSmoothingProvider(const ipsdk::core::BasePriority& priority,
78 
80  ipsdk::processor::RetrievalResult retrieveYGradXSmoothingProvider(const ipsdk::core::BasePriority& priority,
82 
84  ipsdk::processor::RetrievalResult retrieveYGradYDerivationProvider(const ipsdk::core::BasePriority& priority,
86 
88  ipsdk::processor::RetrievalResult retrieveYGradZSmoothingProvider(const ipsdk::core::BasePriority& priority,
90 
92  ipsdk::processor::RetrievalResult retrieveZGradXSmoothingProvider(const ipsdk::core::BasePriority& priority,
94 
96  ipsdk::processor::RetrievalResult retrieveZGradYSmoothingProvider(const ipsdk::core::BasePriority& priority,
98 
100  ipsdk::processor::RetrievalResult retrieveZGradZDerivationProvider(const ipsdk::core::BasePriority& priority,
101  ipsdk::core::ActionProviderPtr& pProvider);
102 
104  void clearIntermediateData();
105 
106 // attributes
107 protected:
110  KernelXYZPtr _pXSmoothingKernel;
111  KernelXYZPtr _pYSmoothingKernel;
112  KernelXYZPtr _pZSmoothingKernel;
113  KernelXYZPtr _pXGradientKernel;
114  KernelXYZPtr _pYGradientKernel;
115  KernelXYZPtr _pZGradientKernel;
117 
118  // border policy used for convolution
119  image::Border3dPolicyPtr _pBorder3dPolicy;
120 };
124 
125 } // end of namespace filter
126 } // end of namespace imaproc
127 } // end of namespace ipsdk
128 
129 #endif // __IPSDKIPLFILTERING_GAUSSIANGRADIENT3DIMGLVL1_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.