ICF 3.1.1.10
Technical documentation of ICF Libraries
CLineProjectionProcessorComp.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#ifndef iipr_CLineProjectionProcessorComp_included
7#define iipr_CLineProjectionProcessorComp_included
8
9
10// Qt includes
11#include <QtCore/QString>
12
13// ICF includes
20
21
22namespace iipr
23{
24
25
27 public iproc::TSyncProcessorCompBase<ILineProjectionProcessor>,
28 virtual public IFeatureToImageMapper,
29 virtual public IProjectionConstraints
30{
31public:
33
34 I_BEGIN_COMPONENT(CLineProjectionProcessorComp);
35 I_REGISTER_INTERFACE(IProjectionConstraints);
36 I_REGISTER_INTERFACE(IFeatureToImageMapper);
37 I_ASSIGN(m_lineParamIdAttrPtr, "LineParamId", "ID of line parameter in parameter set", true, "LineParam");
38 I_ASSIGN(m_featureMapperCompPtr, "FeatureMapper", "Map result feature to projection position, it is needed for mapping operation", false, "FeatureMapper");
39 I_END_COMPONENT;
40
44 template <typename InputPixelType, typename DestPixel, typename CalcPixel>
46 const iimg::IBitmap& bitmap,
47 const i2d::CLine2d& bitmapLine,
48 imeas::IDataSequence& results) const;
49
50 // reimplemented (iipr::IFeatureToImageMapper)
51 virtual bool GetImagePosition(
52 const imeas::INumericValue& feature,
53 const iprm::IParamsSet* paramsPtr,
54 i2d::CVector2d& result) const override;
55
56 // reimplemented (iipr::ILineProjectionProcessor)
57 virtual bool DoProjection(
58 const iimg::IBitmap& bitmap,
59 const i2d::CLine2d& projectionLine,
60 const IProjectionParams* paramsPtr,
61 imeas::IDataSequence& results) override;
62
63 // reimplemented (iproc::IProcessor)
65 const iprm::IParamsSet* paramsPtr,
66 const istd::IPolymorphic* inputPtr,
67 istd::IChangeable* outputPtr,
68 bool allowAsync = false,
69 iproc::IProgressManager* progressManagerPtr = nullptr) override;
70
71 // reimplemented (iipr::IProjectionConstraints)
73 int GetMinProjectionSize() const override;
74 int GetMaxProjectionSize() const override;
75 bool IsAutoProjectionSizeSupported() const override;
76
77protected:
78 // reimplemented (icomp::CComponentBase)
79 void OnComponentCreated() override;
80
81private:
82 I_ATTR(QByteArray, m_lineParamIdAttrPtr);
83 I_REF(IFeatureToProjectionMapper, m_featureMapperCompPtr);
84};
85
86
87} // namespace iipr
88
89
90#endif // !iipr_CLineProjectionProcessorComp_included
91
92
Definition of a line in 2D-space.
Definition CLine2d.h:26
Definition of position or mathematical vector on 2D plane.
Definition CVector2d.h:29
Definition of single plane bitmap.
Definition IBitmap.h:24
bool IsAutoProjectionSizeSupported() const override
Check if automatical projection size is supported.
iproc::TSyncProcessorCompBase< ILineProjectionProcessor > BaseClass
istd::CRange GetLineWidthRange() const override
Get range of possible projection line width.
int GetMinProjectionSize() const override
Get minimal number of projection elements can be calculated by projection.
bool DoAutosizeProjection(const iimg::IBitmap &bitmap, const i2d::CLine2d &bitmapLine, imeas::IDataSequence &results) const
Do projection along specified line with variable projection size.
virtual bool GetImagePosition(const imeas::INumericValue &feature, const iprm::IParamsSet *paramsPtr, i2d::CVector2d &result) const override
Get position in image coordination system using position extracted from projection.
virtual bool DoProjection(const iimg::IBitmap &bitmap, const i2d::CLine2d &projectionLine, const IProjectionParams *paramsPtr, imeas::IDataSequence &results) override
virtual iproc::CTaskState DoProcessing(const iprm::IParamsSet *paramsPtr, const istd::IPolymorphic *inputPtr, istd::IChangeable *outputPtr, bool allowAsync=false, iproc::IProgressManager *progressManagerPtr=nullptr) override
int GetMaxProjectionSize() const override
Get maximal number of projection elements can be calculated by projection.
Interface allowing mapping of extracted features to native coordinate systems.
Interface allowing mapping of extracted features to native coordinate systems.
Describe parameter for projection 2D image to 1D structure.
General definition of sequence contains samples in regular time grid.
General parameter set containing list of numeric values.
Set of general parameters.
Definition IParamsSet.h:29
Represent state of asynchronous operation.
Definition CTaskState.h:28
Consume information about progress of some process.
Simple definition macro for a synchronous processor.
Common interface for data model objects, which can be changed.
Definition IChangeable.h:32
Contains the image processing classes.

© Witold Gantzke and Kirill Lepskiy