IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
HoughSpheres3dLvl1.h
1 // HoughSpheres3dLvl1.h:
3 // ---------------------
4 //
14 
15 #ifndef __IPSDKIPLFEATUREDETECTION_HOUGHSPHERES3DLVL1_H__
16 #define __IPSDKIPLFEATUREDETECTION_HOUGHSPHERES3DLVL1_H__
17 
22 
23 // Attributes headers
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptAccumIntensityThreshold.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptHoughCirclesRadiusRange.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/InOptRemoveTooCloseCirclesParams.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/OutPIHoughSpheres3dPpties.h>
28 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Enumerate/InOptCircleIntensityType.h>
29 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/3d/Optional/InOptGreyImg3d.h>
30 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/3d/Optional/InOptGxGreyImg3d.h>
31 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/3d/Optional/InOptGyGreyImg3d.h>
32 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Input/3d/Optional/InOptGzGreyImg3d.h>
33 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/3d/Optional/OutOptGradXImg3d.h>
34 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/3d/Optional/OutOptGradYImg3d.h>
35 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/3d/Optional/OutOptGradZImg3d.h>
36 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Optional/OutOptRealImg1.h>
37 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Image/Output/Optional/OutOptRealImg2.h>
38 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InOptMaxAngleWithGradDir.h>
39 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InOptNbMaxPtsPerCircle.h>
40 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InOptNbCircles.h>
41 
42 namespace ipsdk {
43 namespace imaproc {
44 namespace fd {
45 
48 
49 // declare processor class
50 IPSDK_DECLARE_LVL1_PROCESSOR(ASYNC2, IPSDKIPLFeatureDetection, HoughSpheres3d,
52  ipsdk::processor::Not(ipsdk::processor::isSet(_pInOptGxGreyImg3d)) &&
53  ipsdk::processor::Not(ipsdk::processor::isSet(_pInOptGyGreyImg3d)) &&
54  ipsdk::processor::Not(ipsdk::processor::isSet(_pInOptGzGreyImg3d)) &&
55  ipsdk::imaproc::matchSize<ipsdk::imaproc::attr::HoughCirclesRadiusRange::MaxRadius>(
56  ipsdk::imaproc::eMatchImageSizeType::eMIST_3d,
57  ipsdk::imaproc::eMatchImageSizeScale::eMISS_HalfSize,
58  _pInOptGreyImg3d,
59  _pInOptHoughCirclesRadiusRange) &&
61  ipsdk::imaproc::matchSize(_pInOptGreyImg3d, _pOutOptGradXImg3d)) &&
63  ipsdk::imaproc::matchSize(_pInOptGreyImg3d, _pOutOptGradYImg3d)) &&
65  ipsdk::imaproc::matchSize(_pInOptGreyImg3d, _pOutOptGradZImg3d)) &&
66  ipsdk::processor::ifIsSet(_pOutOptRealImg1,
67  ipsdk::imaproc::matchSize(_pInOptGreyImg3d, _pOutOptRealImg1)) &&
68  ipsdk::processor::ifIsSet(_pOutOptRealImg2,
69  ipsdk::imaproc::matchSize(_pInOptGreyImg3d, _pOutOptRealImg2)),
70  ipsdk::processor::isSet(_pInOptGxGreyImg3d) &&
71  ipsdk::processor::isSet(_pInOptGyGreyImg3d) &&
72  ipsdk::processor::isSet(_pInOptGzGreyImg3d) &&
73  ipsdk::imaproc::matchSizeAndType(_pInOptGxGreyImg3d, _pInOptGyGreyImg3d) &&
74  ipsdk::imaproc::matchSizeAndType(_pInOptGxGreyImg3d, _pInOptGzGreyImg3d) &&
75  ipsdk::imaproc::matchSize<ipsdk::imaproc::attr::HoughCirclesRadiusRange::MaxRadius>(
76  ipsdk::imaproc::eMatchImageSizeType::eMIST_3d,
77  ipsdk::imaproc::eMatchImageSizeScale::eMISS_HalfSize,
78  _pInOptGxGreyImg3d,
79  _pInOptHoughCirclesRadiusRange) &&
80  ipsdk::processor::ifIsSet(_pOutOptRealImg1,
81  ipsdk::imaproc::matchSize(_pInOptGxGreyImg3d, _pOutOptRealImg1)) &&
82  ipsdk::processor::ifIsSet(_pOutOptRealImg2,
83  ipsdk::imaproc::matchSize(_pInOptGxGreyImg3d, _pOutOptRealImg2)))),
84  (((ipsdk)(imaproc)(attr))(InOptGreyImg3d))
85  (((ipsdk)(imaproc)(attr))(InOptGxGreyImg3d))
86  (((ipsdk)(imaproc)(attr))(InOptGyGreyImg3d))
87  (((ipsdk)(imaproc)(attr))(InOptGzGreyImg3d))
88  (((ipsdk)(imaproc)(attr))(InOptCircleIntensityType))
89  (((ipsdk)(imaproc)(attr))(InOptNbCircles))
90  (((ipsdk)(imaproc)(attr))(InOptMaxAngleWithGradDir))
91  (((ipsdk)(imaproc)(attr))(InOptNbMaxPtsPerCircle))
92  (((ipsdk)(imaproc)(attr))(InOptHoughCirclesRadiusRange))
93  (((ipsdk)(imaproc)(attr))(InOptAccumIntensityThreshold))
94  (((ipsdk)(imaproc)(attr))(InOptRemoveTooCloseCirclesParams))
95  (((ipsdk)(imaproc)(attr))(OutOptRealImg1))
96  (((ipsdk)(imaproc)(attr))(OutOptRealImg2))
97  (((ipsdk)(imaproc)(attr))(OutOptGradXImg3d))
98  (((ipsdk)(imaproc)(attr))(OutOptGradYImg3d))
99  (((ipsdk)(imaproc)(attr))(OutOptGradZImg3d))
100  (((ipsdk)(imaproc)(attr))(OutPIHoughSpheres3dPpties)(ipsdk::processor::allocate)))
101 
102 // methods
103 public:
104 
105 protected:
106  processor::RetrievalResult provideProcessor(const boost::shared_ptr<core::BaseAction>& pProcessor,
107  const core::BasePriority& priority,
108  core::ActionProviderPtr& pProvider);
109 
110  processor::RetrievalResult gaussianGradient(const core::BasePriority& priority, core::ActionProviderPtr& pProvider);
111 
112 // attributes
113 protected:
115  ipsdk::image::ImageConstPtr _pGxImgConst;
116  ipsdk::image::ImageConstPtr _pGyImgConst;
117  ipsdk::image::ImageConstPtr _pGzImgConst;
118 
119 };
120 
123 
124 } // end of namespace fd
125 } // end of namespace imaproc
126 } // end of namespace ipsdk
127 
128 #endif // __IPSDKIPLFEATUREDETECTION_HOUGHSPHERES3DLVL1_H__
ProcessingResult< eRetrievalResultType > RetrievalResult
#define IPSDK_DECLARE_LVL1_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
IPSDKBASEPROCESSING_API RulePtr Not(const RulePtr &pRule)
Definition of import/export macro for library.
boost::enable_if_c< AttributeType::g_bOptional, RulePtr >::type ifIsSet(const boost::shared_ptr< AttributeType > &pAttribute, const RulePtr &pRuleTrue)
boost::shared_ptr< const BaseImage > ImageConstPtr
processor::OutputInitializerPtr allocate(const boost::weak_ptr< OutputAttributeType > &pOutputAttribute)
boost::enable_if_c< AttributeType::g_bOptional, RulePtr >::type isSet(const boost::shared_ptr< AttributeType > &pAttribute)
boost::shared_ptr< BaseActionProvider > ActionProviderPtr
IPSDKBASEPROCESSING_API RulePtr If(const RulePtr &pPredicate, const RulePtr &pRuleTrue)