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"
13 #include "iprm/IParamsSet.h"
15 
16 // ACF-Solutions includes
17 #include "iproc/IProcessor.h"
18 #include "iproc/ISupplier.h"
23 
24 
25 namespace iedge
26 {
27 
28 
30  public iproc::TSupplierCompWrap< QPair< iipr::CFeaturesContainer, QVector<i2d::CAffineTransformation2d> > >,
31  virtual public imeas::INumericValueProvider,
32  virtual public i2d::IMultiCalibrationProvider,
33  virtual public i2d::ICalibrationProvider,
34  virtual public istd::IInformationProvider
35 {
36 public:
38 
39  I_BEGIN_COMPONENT(CEdgeBasedFeaturesSupplierComp);
40  I_REGISTER_INTERFACE(imeas::INumericValueProvider);
41  I_REGISTER_INTERFACE(i2d::IMultiCalibrationProvider);
42  I_REGISTER_INTERFACE(i2d::ICalibrationProvider);
43  I_REGISTER_INTERFACE(istd::IInformationProvider);
44  I_ASSIGN(m_calibrationProviderCompPtr, "CalibrationProvider", "Provide input calibration", true, "EdgeLinesProvider");
45  I_ASSIGN_TO(m_calibrationSupplierCompPtr, m_calibrationProviderCompPtr, false);
46  I_ASSIGN_TO(m_calibrationProviderModelCompPtr, m_calibrationProviderCompPtr, false);
47  I_ASSIGN(m_edgeLinesProviderCompPtr, "EdgeLinesProvider", "Provide list of edge list to processing", true, "EdgeLinesProvider");
48  I_ASSIGN_TO(m_edgeLinesSupplierCompPtr, m_edgeLinesProviderCompPtr, false);
49  I_ASSIGN_TO(m_edgeLinesProviderModelCompPtr, m_edgeLinesProviderCompPtr, false);
50  I_ASSIGN(m_searchProcessorCompPtr, "Processor", "Calculate model positions in the image", true, "Processor");
51  I_ASSIGN(m_slaveInformationProviderCompPtr, "SlaveInformationProvider", "Used to provide the status if set", false, "SlaveInformationProvider");
52  I_ASSIGN(m_searchParamsManagerParamIdAttrPtr, "SearchParamsManagerParameterId", "ID of the parameter manager used for multi search", false, "SearchParamsManagerParamId");
53  I_ASSIGN(m_searchParamsIdAttrPtr, "SearchParamsId", "ID of standard search parameters", true, "SearchParamsId");
54  I_END_COMPONENT;
55 
57 
58  // reimplemented (i2d::IMultiCalibrationProvider)
60  virtual int GetCalibrationsCount() const;
61  virtual const i2d::ICalibration2d* GetCalibration(int calibrationIndex) const;
62 
63  // reimplemented (i2d::ICalibrationProvider)
64  virtual const i2d::ICalibration2d* GetCalibration() const;
65 
66  // reimplemented (imeas::INumericValueProvider)
67  virtual int GetValuesCount() const;
68  virtual const imeas::INumericValue& GetNumericValue(int index) const;
69 
70  // reimplemented (istd::IInformationProvider)
71  virtual QDateTime GetInformationTimeStamp() const;
72  virtual InformationCategory GetInformationCategory() const;
73  virtual int GetInformationId() const;
74  virtual QString GetInformationDescription() const;
75  virtual QString GetInformationSource() const;
76  virtual int GetInformationFlags() const;
77 
78 protected:
79  // reimplemented (iproc::TSupplierCompWrap)
80  virtual bool InitializeWork();
81  virtual int ProduceObject(ProductType& result) const;
82 
83  // reimplemented (icomp::CComponentBase)
84  virtual void OnComponentCreated();
85  virtual void OnComponentDestroyed();
86 
87 private:
88  I_REF(i2d::ICalibrationProvider, m_calibrationProviderCompPtr);
89  I_REF(iproc::ISupplier, m_calibrationSupplierCompPtr);
90  I_REF(imod::IModel, m_calibrationProviderModelCompPtr);
91  I_REF(IEdgeLinesProvider, m_edgeLinesProviderCompPtr);
92  I_REF(iproc::ISupplier, m_edgeLinesSupplierCompPtr);
93  I_REF(imod::IModel, m_edgeLinesProviderModelCompPtr);
94  I_REF(iproc::IProcessor, m_searchProcessorCompPtr);
95  I_REF(istd::IInformationProvider, m_slaveInformationProviderCompPtr);
96  I_ATTR(QByteArray, m_searchParamsManagerParamIdAttrPtr);
97  I_ATTR(QByteArray, m_searchParamsIdAttrPtr);
98 
99  mutable istd::IInformationProvider::InformationCategory m_defaultInformationCategory;
100 };
101 
102 
103 } // namespace iedge
104 
105 
106 #endif // !iedge_CEdgeBasedFeaturesSupplierComp_included
107 
108 
virtual InformationCategory GetInformationCategory() const
virtual int GetValuesCount() const
Get number of numeric values in the list.
virtual QString GetInformationSource() const
virtual const imeas::INumericValue & GetNumericValue(int index) const
Returns a single numeric value from the list.
virtual int GetInformationId() const
QPair< iipr::CFeaturesContainer, QVector< i2d::CAffineTransformation2d > > ProductType
I_ASSIGN_TO(m_calibrationSupplierCompPtr, m_calibrationProviderCompPtr, false)
virtual const i2d::ICalibration2d * GetCalibration() const
virtual QString GetInformationDescription() const
virtual int GetInformationFlags() const
Base interface for suppliers providing synchrone processing of single object with "pull data" model...
Definition: ISupplier.h:22
virtual int ProduceObject(ProductType &result) const
Produce single object.
Provide access to the list of the numeric values.
General parameter set containing list of numeric values.
Definition: INumericValue.h:19
iproc::TSupplierCompWrap< QPair< iipr::CFeaturesContainer, QVector< i2d::CAffineTransformation2d > > > BaseClass
virtual int GetCalibrationsCount() const
Interface for all synchrone and assynchrone processors with "push data" model.
Definition: IProcessor.h:24
virtual QDateTime GetInformationTimeStamp() const
virtual const iprm::IOptionsList * GetCalibrationSelectionContraints() const
virtual bool InitializeWork()
Called if the new work should be initialized.
Standard implementation of interface iproc::ISupplier with preparation for component implementation...

© 2007-2011 Witold Gantzke and Kirill Lepskiy