CEdgeBasedFeaturesSupplierComp.h
Go to the documentation of this file.
1 #ifndef iedge_CEdgeBasedFeaturesSupplierComp_included
2 #define iedge_CEdgeBasedFeaturesSupplierComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QPair>
7 
8 // ACF includes
11 #include <i2d/CVector2d.h>
12 #include <iprm/IParamsSet.h>
14 
15 // ACF-Solutions includes
16 #include <iproc/IProcessor.h>
17 #include <iinsp/ISupplier.h>
22 
23 
24 namespace iedge
25 {
26 
27 
29  public iinsp::TSupplierCompWrap< QPair< iipr::CFeaturesContainer, std::vector<icalib::CAffineCalibration2d> > >,
30  virtual public iipr::IFeaturesProvider,
31  virtual public i2d::IMultiCalibrationProvider,
32  virtual public i2d::ICalibrationProvider,
33  virtual public istd::IInformationProvider
34 {
35 public:
37 
38  I_BEGIN_COMPONENT(CEdgeBasedFeaturesSupplierComp);
39  I_REGISTER_INTERFACE(iipr::IFeaturesProvider);
40  I_REGISTER_INTERFACE(i2d::IMultiCalibrationProvider);
41  I_REGISTER_INTERFACE(i2d::ICalibrationProvider);
42  I_REGISTER_INTERFACE(istd::IInformationProvider);
43  I_ASSIGN(m_calibrationProviderCompPtr, "CalibrationProvider", "Provide input calibration", true, "EdgeLinesProvider");
44  I_ASSIGN_TO(m_calibrationSupplierCompPtr, m_calibrationProviderCompPtr, false);
45  I_ASSIGN_TO(m_calibrationProviderModelCompPtr, m_calibrationProviderCompPtr, false);
46  I_ASSIGN(m_edgeLinesProviderCompPtr, "EdgeLinesProvider", "Provide list of edge list to processing", true, "EdgeLinesProvider");
47  I_ASSIGN_TO(m_edgeLinesSupplierCompPtr, m_edgeLinesProviderCompPtr, false);
48  I_ASSIGN_TO(m_edgeLinesProviderModelCompPtr, m_edgeLinesProviderCompPtr, false);
49  I_ASSIGN(m_searchProcessorCompPtr, "Processor", "Calculate model positions in the image", true, "Processor");
50  I_ASSIGN(m_slaveInformationProviderCompPtr, "SlaveInformationProvider", "Used to provide the status if set", false, "SlaveInformationProvider");
51  I_ASSIGN(m_searchParamsManagerParamIdAttrPtr, "SearchParamsManagerParameterId", "ID of the parameter manager used for multi search", false, "SearchParamsManagerParamId");
52  I_ASSIGN(m_searchParamsIdAttrPtr, "SearchParamsId", "ID of standard search parameters", true, "SearchParamsId");
53  I_END_COMPONENT;
54 
56 
57  // reimplemented (i2d::IMultiCalibrationProvider)
59  virtual int GetCalibrationsCount() const;
60  virtual const i2d::ICalibration2d* GetCalibration(int calibrationIndex) const;
61 
62  // reimplemented (i2d::ICalibrationProvider)
63  virtual const i2d::ICalibration2d* GetCalibration() const;
64 
65  // reimplemented (iipr::IFeaturesProvider)
66  virtual int GetFeaturesCount() const;
67  virtual const imeas::INumericValue& GetFeature(int index) const;
68 
69  // reimplemented (istd::IInformationProvider)
70  virtual QDateTime GetInformationTimeStamp() const;
71  virtual InformationCategory GetInformationCategory() const;
72  virtual int GetInformationId() const;
73  virtual QString GetInformationDescription() const;
74  virtual QString GetInformationSource() const;
75  virtual int GetInformationFlags() const;
76 
77 protected:
78  // reimplemented (iinsp::TSupplierCompWrap)
79  virtual bool InitializeWork();
80  virtual int ProduceObject(ProductType& result) const;
81 
82  // reimplemented (icomp::CComponentBase)
83  virtual void OnComponentCreated();
84  virtual void OnComponentDestroyed();
85 
86 private:
87  I_REF(i2d::ICalibrationProvider, m_calibrationProviderCompPtr);
88  I_REF(iinsp::ISupplier, m_calibrationSupplierCompPtr);
89  I_REF(imod::IModel, m_calibrationProviderModelCompPtr);
90  I_REF(IEdgeLinesProvider, m_edgeLinesProviderCompPtr);
91  I_REF(iinsp::ISupplier, m_edgeLinesSupplierCompPtr);
92  I_REF(imod::IModel, m_edgeLinesProviderModelCompPtr);
93  I_REF(iproc::IProcessor, m_searchProcessorCompPtr);
94  I_REF(istd::IInformationProvider, m_slaveInformationProviderCompPtr);
95  I_ATTR(QByteArray, m_searchParamsManagerParamIdAttrPtr);
96  I_ATTR(QByteArray, m_searchParamsIdAttrPtr);
97 
98  mutable istd::IInformationProvider::InformationCategory m_defaultInformationCategory;
99 };
100 
101 
102 } // namespace iedge
103 
104 
105 #endif // !iedge_CEdgeBasedFeaturesSupplierComp_included
106 
107 
virtual InformationCategory GetInformationCategory() const
virtual QString GetInformationSource() const
Standard implementation of interface iinsp::ISupplier with preparation for component implementation...
virtual int GetInformationId() const
virtual const i2d::ICalibration2d * GetCalibration() const
Container allowing access to features.
virtual QString GetInformationDescription() const
virtual int GetInformationFlags() const
virtual int ProduceObject(ProductType &result) const
Produce single object.
General parameter set containing list of numeric values.
Definition: INumericValue.h:20
virtual const imeas::INumericValue & GetFeature(int index) const
Get access to single feature.
Base interface for suppliers providing calculating of objects on demand ("pull data" model)...
Definition: ISupplier.h:22
virtual int GetCalibrationsCount() const
Interface for all synchrone and asynchrone processors with "push data" model.
Definition: IProcessor.h:24
QPair< iipr::CFeaturesContainer, std::vector< icalib::CAffineCalibration2d > > ProductType
virtual QDateTime GetInformationTimeStamp() const
iinsp::TSupplierCompWrap< QPair< iipr::CFeaturesContainer, std::vector< icalib::CAffineCalibration2d > > > BaseClass
virtual int GetFeaturesCount() const
Get number of stored features.
virtual const iprm::IOptionsList * GetCalibrationSelectionContraints() const
virtual bool InitializeWork()
Called if the new work should be initialized.

© 2007-2017 Witold Gantzke and Kirill Lepskiy