ICF 3.1.1.10
Technical documentation of ICF Libraries
CObjectFeature.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
10#include <i2d/CPosition2d.h>
13
14
15namespace iipr
16{
17
18
22class CObjectFeature: public TWeightedFeatureWrap<i2d::CPosition2d>
23{
24public:
26
29 double weight,
30 const i2d::CVector2d& position,
31 double angle = 0.0,
32 const i2d::CVector2d& scale = i2d::CVector2d(1.0, 1.0));
33
34 double GetAngle() const;
36
37 QByteArray GetObjectId() const;
38 void SetObjectId(const QByteArray& objectId);
39
41
42 // reimplemented (imeas::INumericValue)
43 bool IsValueTypeSupported(ValueTypeId valueTypeId, bool editableOnly = false) const override;
44 double GetComponentValue(ValueTypeId valueTypeId) const override;
45 bool SetComponentValue(ValueTypeId valueTypeId, double value) override;
46
47 // reimplemented (iser::ISerializable)
48 bool Serialize(iser::IArchive& archive) override;
49
50 // reimplemented (istd::IChangeable)
51 bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS) override;
52 std::unique_ptr<istd::IChangeable> CloneMe(CompatibilityMode mode = CM_WITHOUT_REFS) const override;
53
54private:
55 double m_angle;
56 i2d::CVector2d m_scale;
57 QByteArray m_objectId;
58 i2d::CAffineTransformation2d m_transformation;
59};
60
61
62} // namespace iipr
63
64
Definition of an affine transformation for 2D-spaces.
Definition of position or mathematical vector on 2D plane.
Definition CVector2d.h:29
Common interface for all calibration objects.
Implementation of a general image object feature.
double GetComponentValue(ValueTypeId valueTypeId) const override
CObjectFeature(double weight, const i2d::CVector2d &position, double angle=0.0, const i2d::CVector2d &scale=i2d::CVector2d(1.0, 1.0))
bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
bool IsValueTypeSupported(ValueTypeId valueTypeId, bool editableOnly=false) const override
TWeightedFeatureWrap< i2d::CPosition2d > BaseClass
double GetAngle() const
QByteArray GetObjectId() const
bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
std::unique_ptr< istd::IChangeable > CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const override
Make a copy of this object.
bool SetComponentValue(ValueTypeId valueTypeId, double value) override
void SetObjectId(const QByteArray &objectId)
i2d::CVector2d GetScale() const
const i2d::ITransformation2d & GetTransformation() const
Wrapper allowing to create feature object from some another serializable one.
INumericConstraints::ValueTypeId ValueTypeId
Represent input/output persistence archive.
Definition IArchive.h:34
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Contains the image processing classes.

© Witold Gantzke and Kirill Lepskiy