CPositionFromImageSupplierComp.h
Go to the documentation of this file.
1 #ifndef iipr_CPositionFromImageSupplierComp_included
2 #define iipr_CPositionFromImageSupplierComp_included
3 
4 
5 // ACF includes
6 #include <i2d/ICalibration2d.h>
8 #include <i2d/CVector2d.h>
9 
10 // ACF-Solutions includes
11 #include <iproc/IProcessor.h>
12 #include <iinsp/ISupplier.h>
16 #include <iimg/IBitmapProvider.h>
17 
18 
19 namespace iipr
20 {
21 
22 
30  public iinsp::TSupplierCompWrap<CFeaturesContainer>,
31  virtual public IFeaturesProvider,
32  virtual public i2d::ICalibrationProvider
33 {
34 public:
36 
37  I_BEGIN_COMPONENT(CPositionFromImageSupplierComp);
38  I_REGISTER_INTERFACE(IFeaturesProvider);
39  I_REGISTER_INTERFACE(i2d::ICalibrationProvider);
40  I_ASSIGN(m_bitmapProviderCompPtr, "BitmapProvider", "Provide image to analyse", true, "BitmapProvider");
41  I_ASSIGN_TO(m_bitmapSupplierCompPtr, m_bitmapProviderCompPtr, false);
42  I_ASSIGN_TO(m_bitmapProviderModelCompPtr, m_bitmapProviderCompPtr, false);
43  I_ASSIGN(m_calibrationProviderCompPtr, "CalibrationProvider", "Provide 2D-calibration object", false, "CalibrationProvider");
44  I_ASSIGN(m_processorCompPtr, "Processor", "Processor calculating set of positions from image", true, "Processor");
45  I_END_COMPONENT;
46 
47  // reimplemented (iipr::IFeaturesProvider)
48  virtual int GetFeaturesCount() const;
49  virtual const imeas::INumericValue& GetFeature(int index) const;
50 
51  // reimplemented (i2d::ICalibrationProvider)
52  virtual const i2d::ICalibration2d* GetCalibration() const;
53 
54 protected:
55  // reimplemented (iinsp::TSupplierCompWrap)
56  virtual int ProduceObject(ProductType& result) const;
57 
58  // reimplemented (icomp::CComponentBase)
59  virtual void OnComponentCreated();
60 
61 protected:
63 
64 private:
65  I_REF(iimg::IBitmapProvider, m_bitmapProviderCompPtr);
66  I_REF(iinsp::ISupplier, m_bitmapSupplierCompPtr);
67  I_REF(imod::IModel, m_bitmapProviderModelCompPtr);
68  I_REF(i2d::ICalibrationProvider, m_calibrationProviderCompPtr);
69  I_REF(iproc::IProcessor, m_processorCompPtr);
70 };
71 
72 
73 } // namespace iipr
74 
75 
76 #endif // !iipr_CPositionFromImageSupplierComp_included
77 
78 
virtual const imeas::INumericValue & GetFeature(int index) const
Get access to single feature.
virtual int ProduceObject(ProductType &result) const
Standard implementation of interface iinsp::ISupplier with preparation for component implementation...
virtual const i2d::ICalibration2d * GetCalibration() const
Container allowing access to features.
virtual int GetFeaturesCount() const
Get number of stored features.
istd::TDelPtr< const i2d::ICalibration2d > m_outputCalibrationPtr
Implementation of value supplier returning position on the image.
General parameter set containing list of numeric values.
Definition: INumericValue.h:20
Base interface for suppliers providing calculating of objects on demand ("pull data" model)...
Definition: ISupplier.h:22
Interface for all synchrone and asynchrone processors with "push data" model.
Definition: IProcessor.h:24
iinsp::TSupplierCompWrap< CFeaturesContainer > BaseClass

© 2007-2017 Witold Gantzke and Kirill Lepskiy