IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
ShapeAnalysis3dLvl2.h
1 // ShapeAnalysis3dLvl2.h:
3 // ----------------------
4 //
14 
15 #ifndef __IPSDKIPLSHAPEANALYSIS_SHAPEANALYSIS3DLVL2_H__
16 #define __IPSDKIPLSHAPEANALYSIS_SHAPEANALYSIS3DLVL2_H__
17 
21 #include <IPSDKIPL/IPSDKIPLAttributes/DataItem/PlanIndexedStatsResult.h>
23 
24 // Attributes headers
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/GeometryEntityColl/InLabelsShape3d.h>
26 #include <IPSDKIPL/IPSDKIPLShapeAnalysis/Attribute/GeometryEntityColl/InOptLabelsShape3d2.h>
27 #include <IPSDKIPL/IPSDKIPLShapeAnalysis/Attribute/GeometryEntityColl/InOptLabelsShape3d3.h>
28 #include <IPSDKIPL/IPSDKIPLShapeAnalysis/Attribute/GeometryEntityColl/InOptLabelsShape3d4.h>
29 #include <IPSDKIPL/IPSDKIPLShapeAnalysis/Attribute/Image/InOptSubColorOrGreyImg3d1.h>
30 #include <IPSDKIPL/IPSDKIPLShapeAnalysis/Attribute/Image/InOptSubColorOrGreyImg3d2.h>
31 #include <IPSDKIPL/IPSDKIPLShapeAnalysis/Attribute/Image/InOptSubColorOrGreyImg3d3.h>
32 #include <IPSDKIPL/IPSDKIPLShapeAnalysis/Attribute/Image/InOptSubColorOrGreyImg3d4.h>
33 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/MeasureInfoSet/InMeasureInfoSet3d.h>
34 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/MeasureSet/OutMeasureSet.h>
35 
36 namespace ipsdk {
37 namespace imaproc {
38 namespace shape {
39 namespace analysis {
40 
43 
44 // declare processor class
45 IPSDK_DECLARE_LVL2_PROCESSOR(REP_ASYNC1, IPSDKIPLShapeAnalysis, ShapeAnalysis3d,
46  validateMeasureRequirements(_pOutMeasureSet,
47  _pInLabelsShape3d, _pInOptLabelsShape3d2, _pInOptLabelsShape3d3, _pInOptLabelsShape3d4,
48  _pInOptSubColorOrGreyImg3d1, _pInOptSubColorOrGreyImg3d2,
49  _pInOptSubColorOrGreyImg3d3, _pInOptSubColorOrGreyImg3d4),
50  (((ipsdk)(imaproc)(attr))(InLabelsShape3d))
51  (((ipsdk)(imaproc)(shape)(analysis))(InOptLabelsShape3d2))
52  (((ipsdk)(imaproc)(shape)(analysis))(InOptLabelsShape3d3))
53  (((ipsdk)(imaproc)(shape)(analysis))(InOptLabelsShape3d4))
54  (((ipsdk)(imaproc)(shape)(analysis))(InOptSubColorOrGreyImg3d1))
55  (((ipsdk)(imaproc)(shape)(analysis))(InOptSubColorOrGreyImg3d2))
56  (((ipsdk)(imaproc)(shape)(analysis))(InOptSubColorOrGreyImg3d3))
57  (((ipsdk)(imaproc)(shape)(analysis))(InOptSubColorOrGreyImg3d4))
58  (((ipsdk)(imaproc)(attr))(OutMeasureSet)))
59 
60 // methods
61 public:
62 
63 protected:
65  void updateGlobalMsrInfo(const ipsdk::shape::analysis::eMsrInputImageId& msrInputImageId,
66  const ImageAttributeConstPtr& pImgAttribute);
67 
69  processor::RetrievalResult retrieveStatsProvider(const core::BasePriority& priority,
70  core::ActionProviderPtr& pProvider,
71  const image::ImageConstPtr& pInImg);
72 
74  processor::RetrievalResult retrieveIndivisibleMsrProvider(const core::BasePriority& priority,
75  core::ActionProviderPtr& pProvider);
76 
78  void notifyIndivisibleProviderCompletion(const core::ActionProviderPtr& pProvider);
79 
80 
82  processor::RetrievalResult retrieveGenericMsrProvider(const core::BasePriority& priority,
83  core::ActionProviderPtr& pProvider);
84 
86  void notifyGenericProviderCompletion(const core::ActionProviderPtr& pProvider);
87 
89  processor::RetrievalResult retrieveGeometry3dMsrProvider(const core::BasePriority& priority,
90  core::ActionProviderPtr& pProvider);
91 
93  void notifyGeometry3dProviderCompletion(const core::ActionProviderPtr& pProvider);
94 
96  processor::RetrievalResult retrieveIntensityMsrProvider(const core::BasePriority& priority,
97  core::ActionProviderPtr& pProvider);
98 
100  void notifyIntensityProviderPreprocessCompletion(const core::ActionProviderPtr& pProvider);
101 
103  void notifyIntensityProviderCompletion(const core::ActionProviderPtr& pProvider);
104 
105 // attributes
106 protected:
108  attr::PlanIndexedStatsResultPtr _pPIStatsResult;
109 
112 
115 
117  ipsdk::shape::analysis::eMsrShapeRequirements _msrShapeRequirements;
118 
121 
123  MeasureSetCollPtr _pMeasureSetColl;
124 
126  UInt64VectorCollPtr _pShapeIndexesColl;
127 
130 
132  typedef std::pair<ipsdk::shape::analysis::eMsrInputShapeCollId, GeometricCalibrationConstPtr> CalibShapeId;
133 
135  typedef std::vector<std::pair<CalibShapeId, ipsdk::shape::segmentation::Shape3dCollConstPtr> > CalibShape3dColl;
136 
138  CalibShapeId _curCalibShapeId;
139 
141  CalibShape3dColl _calibShape3dColl;
142 
144  typedef std::pair<ipsdk::shape::analysis::eMsrInputImageId, ipsdk::shape::analysis::IntensityPreProcessorConfigPtr> PreProcImgId;
145 
147  typedef std::vector<std::pair<PreProcImgId, ipsdk::image::ImageConstPtr> > PreProcImgIdColl;
148 
150  PreProcImgId _curPreProcImgId;
151 
153  PreProcImgIdColl _preProcImgIdColl;
154 
156  processor::ProcessorPtr _pPreProcessor;
157 
161  ipsdk::GeometricCalibrationConstPtr _pImageGeometricCalibration;
162 };
163 
166 
167 } // end of namespace analysis
168 } // end of namespace shape
169 } // end of namespace imaproc
170 } // end of namespace ipsdk
171 
172 #endif // __IPSDKIPLSHAPEANALYSIS_SHAPEANALYSIS3DLVL2_H__
ProcessingResult< eRetrievalResultType > RetrievalResult
#define IPSDK_DECLARE_LVL2_PROCESSOR(ProcType, libraryName, algoName, RuleString, attributeSeq)
boost::shared_ptr< MeasureSetColl > MeasureSetCollPtr
boost::shared_ptr< const MeasureConfig > MeasureConfigConstPtr
boost::shared_ptr< const ipsdk::GeometricCalibration > GeometricCalibrationConstPtr
boost::shared_ptr< const BaseImageAttribute > ImageAttributeConstPtr
Definition of import/export macro for library.
boost::shared_ptr< UInt64VectorColl > UInt64VectorCollPtr
processor::RulePtr validateMeasureRequirements(const ShapeMeasureInfoSetAttributeConstPtr &pInMeasureInfoSet2d, const boost::shared_ptr< attr::InPILabelsShape2d > &pInPILabelsShape2d, const boost::shared_ptr< InOptPILabelsShape2d2 > &pInOptPILabelsShape2d2, const boost::shared_ptr< InOptPILabelsShape2d3 > &pInOptPILabelsShape2d3, const boost::shared_ptr< InOptPILabelsShape2d4 > &pInOptPILabelsShape2d4, const ImageAttributeConstPtr &pInOptGreyMsrImg1, const ImageAttributeConstPtr &pInOptGreyMsrImg2, const ImageAttributeConstPtr &pInOptGreyMsrImg3, const ImageAttributeConstPtr &pInOptGreyMsrImg4)
rule allowing to check that input parameters provided for shape analysis satisfy requirements of meas...
boost::shared_ptr< const BaseImage > ImageConstPtr
boost::shared_ptr< const Shape3dColl > Shape3dCollConstPtr
boost::shared_ptr< BaseProcessor > ProcessorPtr
boost::shared_ptr< BaseActionProvider > ActionProviderPtr
Utility functions for shape analysis parameters check.
boost::shared_ptr< MeasureSet > MeasureSetPtr
boost::shared_ptr< ipsdk::imaproc::attr::PlanIndexedStatsResult > PlanIndexedStatsResultPtr
shared pointer to ipsdk::imaproc::attr::PlanIndexedStatsResult
Definition: PlanIndexedStatsResult.h:50