ICF 3.0.5.47
Technical documentation of ICF Libraries
CSelectableBitmapSupplierComp.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// Qt includes
10#include <QtCore/QPair>
11
12// ICF includes
13#include <i2d/ICalibration2d.h>
16#include <iimg/IBitmap.h>
18#include <iinsp/ISupplier.h>
22
23
24namespace icam
25{
26
27
32 public iinsp::TSupplierCompWrap<QPair<std::unique_ptr<const i2d::ICalibration2d>, std::unique_ptr<iimg::IBitmap>>>,
33 virtual public iimg::IBitmapProvider,
34 virtual public i2d::ICalibration2dProvider
35{
36public:
38
39 I_BEGIN_COMPONENT(CSelectableBitmapSupplierComp);
40 I_REGISTER_INTERFACE(iimg::IBitmapProvider);
41 I_REGISTER_INTERFACE(i2d::ICalibration2dProvider);
42 I_ASSIGN(m_bitmapCompFact, "BitmapFactory", "Use to create bitmap object", true, "BitmapFactory");
43 I_ASSIGN(m_multiBitmapProviderCompPtr, "MultiBitmapProvider", "Provider of the bitmap list", true, "MultiBitmapProvider");
44 I_ASSIGN_TO(m_multiBitmapCalibCompPtr, m_multiBitmapProviderCompPtr, false);
45 I_ASSIGN_TO(m_multiBitmapMultiCalibCompPtr, m_multiBitmapProviderCompPtr, false);
46 I_ASSIGN_TO(m_multiBitmapSupplierCompPtr, m_multiBitmapProviderCompPtr, false);
47 I_ASSIGN_TO(m_multiBitmapProviderModelCompPtr, m_multiBitmapProviderCompPtr, false);
48 I_ASSIGN(m_bitmapSelectionCompPtr, "BitmapSelection", "Index of the bitmap in the list", true, "BitmapSelection");
49 I_ASSIGN_TO(m_bitmapSelectionModelCompPtr, m_bitmapSelectionCompPtr, true);
50 I_END_COMPONENT;
51
52 // reimplemented (iimg::IBitmapProvider)
53 const iimg::IBitmap* GetBitmap() const override;
54
55 // reimplemented (i2d::ICalibration2dProvider)
56 const i2d::ICalibration2d* GetCalibration() const override;
57
58protected:
59 // reimplemented (iinsp::TSupplierCompWrap)
60 int ProduceObject(ProductType& result) const override;
61
62 // reimplemented (icomp::CComponentBase)
63 void OnComponentCreated() override;
64 void OnComponentDestroyed() override;
65
66private:
67 I_FACT(iimg::IBitmap, m_bitmapCompFact);
68
69 I_REF(iimg::IMultiBitmapProvider, m_multiBitmapProviderCompPtr);
70 I_REF(i2d::ICalibration2dProvider, m_multiBitmapCalibCompPtr);
71 I_REF(i2d::IMultiCalibrationProvider, m_multiBitmapMultiCalibCompPtr);
72 I_REF(iinsp::ISupplier, m_multiBitmapSupplierCompPtr);
73 I_REF(imod::IModel, m_multiBitmapProviderModelCompPtr);
74
75 I_REF(iprm::ISelectionParam, m_bitmapSelectionCompPtr);
76 I_REF(imod::IModel, m_bitmapSelectionModelCompPtr);
77};
78
79
80} // namespace icam
81
82
Common interface for an object, which delivers a 2D-calibration.
Common interface for an object, which delivers a list of 2D-calibration objects.
Implementation of bitmap supplier based on selection of the bitmap from underlaying multi-bitmap prov...
const i2d::ICalibration2d * GetCalibration() const override
Get access to transformation object, which transforms a local logical coordinate system to global one...
iinsp::TSupplierCompWrap< QPair< std::unique_ptr< const i2d::ICalibration2d >, std::unique_ptr< iimg::IBitmap > > > BaseClass
const iimg::IBitmap * GetBitmap() const override
Get access to produced bitmap object.
int ProduceObject(ProductType &result) const override
Definition of single plane bitmap.
Definition IBitmap.h:24
Bitmap supplier allowing to access of produced bitmap.
Supplier allowing to access of multiple produced bitmaps.
Base interface for suppliers providing calculating of objects on demand ("pull data" model).
Definition ISupplier.h:28
Standard implementation of interface iinsp::ISupplier with preparation for component implementation.
QPair< std::unique_ptr< const i2d::ICalibration2d >, std::unique_ptr< iimg::IBitmap > > ProductType
Common interface for model objects, that supports Model/Observer design pattern.
Definition IModel.h:29
Interface allowing to select single option from list of options.
Contains interfaces, implementations and components of image acquisition and processing.

© Witold Gantzke and Kirill Lepskiy