CSearchBasedFeaturesSupplierComp.h
Go to the documentation of this file.
1 #ifndef iipr_CSearchBasedFeaturesSupplierComp_included
2 #define iipr_CSearchBasedFeaturesSupplierComp_included
3 
4 
5 // ACF includes
7 #include "i2d/CVector2d.h"
9 #include "iprm/IParamsSet.h"
11 
12 // ACF-Solutions includes
13 #include "iproc/IProcessor.h"
14 #include "iproc/ISupplier.h"
17 #include "iimg/IBitmapProvider.h"
19 
20 
21 namespace iipr
22 {
23 
24 
26  public iproc::TSupplierCompWrap<CFeaturesContainer>,
27  virtual public imeas::INumericValueProvider,
28  virtual public i2d::IMultiCalibrationProvider,
29  virtual public istd::IInformationProvider
30 {
31 public:
33 
34  I_BEGIN_COMPONENT(CSearchBasedFeaturesSupplierComp);
35  I_REGISTER_INTERFACE(imeas::INumericValueProvider);
36  I_REGISTER_INTERFACE(i2d::IMultiCalibrationProvider);
37  I_REGISTER_INTERFACE(istd::IInformationProvider);
38  I_ASSIGN(m_bitmapProviderCompPtr, "BitmapProvider", "Provide image to analyse", true, "BitmapProvider");
39  I_ASSIGN_TO(m_bitmapSupplierCompPtr, m_bitmapProviderCompPtr, false);
40  I_ASSIGN_TO(m_bitmapProviderModelCompPtr, m_bitmapProviderCompPtr, false);
41  I_ASSIGN(m_searchProcessorCompPtr, "Processor", "Calculate model positions in the image", true, "Processor");
42  I_ASSIGN(m_slaveInformationProviderCompPtr, "SlaveInformationProvider", "Used to provide the status if set", false, "SlaveInformationProvider");
43  I_ASSIGN(m_searchParamsManagerParamIdAttrPtr, "SearchParamsManagerParameterId", "ID of the parameter manager used for multi search", false, "SearchParamsManagerParamId");
44  I_ASSIGN(m_searchParamsIdAttrPtr, "SearchParamsId", "ID of standard search parameters", true, "SearchParamsId");
45  I_END_COMPONENT;
46 
48 
49  // reimplemented (i2d::IMultiCalibrationProvider)
51  virtual int GetCalibrationsCount() const;
52  virtual const i2d::ICalibration2d* GetCalibration(int calibrationIndex) const;
53 
54  // reimplemented (imeas::INumericValueProvider)
55  virtual int GetValuesCount() const;
56  virtual const imeas::INumericValue& GetNumericValue(int index) const;
57 
58  // reimplemented (istd::IInformationProvider)
59  virtual QDateTime GetInformationTimeStamp() const;
60  virtual InformationCategory GetInformationCategory() const;
61  virtual int GetInformationId() const;
62  virtual QString GetInformationDescription() const;
63  virtual QString GetInformationSource() const;
64  virtual int GetInformationFlags() const;
65 
66 protected:
67  // reimplemented (iproc::TSupplierCompWrap)
68  virtual bool InitializeWork();
69  virtual int ProduceObject(CFeaturesContainer& result) const;
70 
71  // reimplemented (icomp::CComponentBase)
72  virtual void OnComponentCreated();
73  virtual void OnComponentDestroyed();
74 
75 private:
76  I_REF(iimg::IBitmapProvider, m_bitmapProviderCompPtr);
77  I_REF(iproc::ISupplier, m_bitmapSupplierCompPtr);
78  I_REF(imod::IModel, m_bitmapProviderModelCompPtr);
79  I_REF(iproc::IProcessor, m_searchProcessorCompPtr);
80  I_REF(istd::IInformationProvider, m_slaveInformationProviderCompPtr);
81  I_ATTR(QByteArray, m_searchParamsManagerParamIdAttrPtr);
82  I_ATTR(QByteArray, m_searchParamsIdAttrPtr);
83 
84  typedef QVector<i2d::CAffineTransformation2d> TransformationList;
85 
86  mutable TransformationList m_transformationList;
87 
88  mutable istd::IInformationProvider::InformationCategory m_defaultInformationCategory;
89 };
90 
91 
92 } // namespace iipr
93 
94 
95 #endif // !iipr_CSearchBasedFeaturesSupplierComp_included
96 
97 
virtual const iprm::IOptionsList * GetCalibrationSelectionContraints() const
virtual QDateTime GetInformationTimeStamp() const
virtual int GetCalibrationsCount() const
virtual QString GetInformationSource() const
iproc::TSupplierCompWrap< CFeaturesContainer > BaseClass
virtual bool InitializeWork()
Called if the new work should be initialized.
I_ASSIGN_TO(m_bitmapSupplierCompPtr, m_bitmapProviderCompPtr, false)
Basic implementation of a features container.
virtual QString GetInformationDescription() const
Base interface for suppliers providing synchrone processing of single object with "pull data" model...
Definition: ISupplier.h:22
Provide access to the list of the numeric values.
General parameter set containing list of numeric values.
Definition: INumericValue.h:19
virtual int ProduceObject(CFeaturesContainer &result) const
virtual InformationCategory GetInformationCategory() const
virtual const imeas::INumericValue & GetNumericValue(int index) const
Returns a single numeric value from the list.
Interface for all synchrone and assynchrone processors with "push data" model.
Definition: IProcessor.h:24
virtual int GetInformationFlags() const
virtual const i2d::ICalibration2d * GetCalibration(int calibrationIndex) const
Standard implementation of interface iproc::ISupplier with preparation for component implementation...
virtual int GetValuesCount() const
Get number of numeric values in the list.

© 2007-2011 Witold Gantzke and Kirill Lepskiy