ICF 3.0.5.47
Technical documentation of ICF Libraries
CComposedAffineCalibrationComp.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// ICF includes
12#include <i2d/ICalibration2d.h>
15#include <imeas/INumericValue.h>
16
17
18namespace icalib
19{
20
21
30{
31public:
34
35 I_BEGIN_COMPONENT(CComposedAffineCalibrationComp);
36 I_REGISTER_INTERFACE(i2d::ICalibration2dProvider);
37 I_REGISTER_INTERFACE(ICalibration2d);
38 I_REGISTER_INTERFACE(ITransformation2d);
39 I_REGISTER_INTERFACE(iser::ISerializable);
40 I_REGISTER_INTERFACE(i2d::CAffineTransformation2d);
41 I_ASSIGN(m_rotationAngleCompPtr, "RotationAngle", "Rotation angle in degree", false, "RotationAngle");
42 I_ASSIGN_TO(m_rotationAngleModelCompPtr, m_rotationAngleCompPtr, false);
43 I_ASSIGN(m_scaleCompPtr, "ScaleXY", "Scale values (x,y)", false, "ScaleXY");
44 I_ASSIGN(m_translationCompPtr, "TranslationXY", "Translation (x,y)", false, "TranslationXY");
45 I_ASSIGN_TO(m_translationModelCompPtr, m_translationCompPtr, false);
46 I_END_COMPONENT;
47
48 // reimplemented (i2d::ICalibration2dProvider)
49 const i2d::ICalibration2d* GetCalibration() const override;
50
51protected:
58
59 // reimplemented (icomp::CComponentBase)
60 void OnComponentCreated() override;
61 void OnComponentDestroyed() override;
62
63 // reimplemented (imod::CMultiModelDispatcherBase)
64 void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet& changeSet) override;
65
66private:
67 void UpdateMatrix();
68 void UpdateTranslation();
69
70private:
71 I_REF(imeas::INumericValue, m_rotationAngleCompPtr);
72 I_REF(imod::IModel, m_rotationAngleModelCompPtr);
73 I_REF(imeas::INumericValue, m_scaleCompPtr);
74 I_REF(imod::IModel, m_scaleModelCompPtr);
75 I_REF(imeas::INumericValue, m_translationCompPtr);
76 I_REF(imod::IModel, m_translationModelCompPtr);
77};
78
79
80} // namespace icalib
81
82
Definition of an affine transformation for 2D-spaces.
Common interface for an object, which delivers a 2D-calibration.
Definition of an affine transformation for 2D-spaces.
Provides affine calibration based on rotation, scale and translation parameters.
void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet &changeSet) override
Called when some model observed by dispatcher will be changed.
const i2d::ICalibration2d * GetCalibration() const override
Get access to transformation object, which transforms a local logical coordinate system to global one...
Base class for component implementation.
General parameter set containing list of numeric values.
Generic implementation of a data model changes notifier.
Common interface for model objects, that supports Model/Observer design pattern.
Definition IModel.h:29
Common class for all classes which objects can be archived or restored from archive.
Set of change flags (its IDs).
Definition IChangeable.h:38
Contains interfaces, implementations and components related to 2D calibration and transformations.

© Witold Gantzke and Kirill Lepskiy