CSnapBitmapSupplierComp.h
Go to the documentation of this file.
1 #ifndef icam_CSnapBitmapSupplierComp_included
2 #define icam_CSnapBitmapSupplierComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QPair>
7 
8 // ACF includes
9 #include "istd/TDelPtr.h"
10 #include "i2d/ICalibration2d.h"
12 #include "iimg/IBitmap.h"
14 
15 // ACF-Solutions includes
17 #include "iimg/IBitmapProvider.h"
20 
21 
22 namespace icam
23 {
24 
25 
30  public iproc::TSupplierCompWrap< QPair<istd::TDelPtr<const i2d::ICalibration2d>, istd::TDelPtr<iimg::IBitmap> > >,
31  virtual public iimg::IBitmapProvider,
32  virtual public i2d::ICalibrationProvider
33 {
34 public:
36 
37  I_BEGIN_COMPONENT(CSnapBitmapSupplierComp);
38  I_REGISTER_INTERFACE(iimg::IBitmapProvider);
39  I_REGISTER_INTERFACE(i2d::ICalibrationProvider);
40  I_REGISTER_SUBELEMENT(ScaleConstraints);
41  I_ASSIGN(m_bitmapCompFact, "BitmapFactory", "Use to create bitmap object", true, "BitmapFactory");
42  I_ASSIGN(m_bitmapAcquisitionCompPtr, "BitmapAcquisition", "Bitmap acquisition object for image snap", true, "BitmapAcquisition");
43  I_ASSIGN(m_calibrationCompPtr, "Calibration", "Optional calibration object", false, "Calibration");
44  I_ASSIGN(m_scaleParamIdAttrPtr, "ScaleParamId", "ID of resolution parameter in parameter set (type imeas::INumericValue, unit: pixel/mm)", false, "ScaleParamId");
45  I_ASSIGN(m_defaultScaleValueCompPtr, "DefaultScaleParam", "Default resolution in pixel/mm", false, "DefaultScaleParam");
46  I_ASSIGN(m_calibratedUnitInfoCompPtr, "CalibratedUnit", "Describe unit of result calibration", false, "CalibratedUnit");
47  I_END_COMPONENT;
48 
49  // reimplemented (iimg::IBitmapProvider)
50  virtual const iimg::IBitmap* GetBitmap() const;
51 
52  // reimplemented (i2d::ICalibrationProvider)
53  virtual const i2d::ICalibration2d* GetCalibration() const;
54 
55 protected:
56  // reimplemented (iproc::TSupplierCompWrap)
57  virtual bool InitializeWork();
58  virtual int ProduceObject(ProductType& result) const;
59 
60 private:
61  I_FACT(iimg::IBitmap, m_bitmapCompFact);
62 
63  I_REF(IBitmapAcquisition, m_bitmapAcquisitionCompPtr);
64  I_REF(i2d::ICalibration2d, m_calibrationCompPtr);
65  I_ATTR(QByteArray, m_scaleParamIdAttrPtr);
66  I_REF(imeas::INumericValue, m_defaultScaleValueCompPtr);
67  I_REF(imath::IUnitInfo, m_calibratedUnitInfoCompPtr);
68 };
69 
70 
71 } // namespace icam
72 
73 
74 #endif // !icam_CSnapBitmapSupplierComp_included
75 
76 
Implementation of bitmap supplier based on image acquisition.
Bitmap acquisition processor.
iproc::TSupplierCompWrap< QPair< istd::TDelPtr< const i2d::ICalibration2d >, istd::TDelPtr< iimg::IBitmap > > > BaseClass
virtual const i2d::ICalibration2d * GetCalibration() const
virtual bool InitializeWork()
Called if the new work should be initialized.
QPair< istd::TDelPtr< const i2d::ICalibration2d >, istd::TDelPtr< iimg::IBitmap > > ProductType
General parameter set containing list of numeric values.
Definition: INumericValue.h:19
virtual const iimg::IBitmap * GetBitmap() const
virtual int ProduceObject(ProductType &result) const
I_REGISTER_SUBELEMENT(ScaleConstraints)
Standard implementation of interface iproc::ISupplier with preparation for component implementation...

© 2007-2011 Witold Gantzke and Kirill Lepskiy