CLineProjectionProcessorComp.h
Go to the documentation of this file.
1 #ifndef iipr_CLineProjectionProcessorComp_included
2 #define iipr_CLineProjectionProcessorComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QString>
7 
8 // ACF includes
9 #include <icomp/CComponentBase.h>
10 
11 // ACF-Solutions includes
17 
18 
19 namespace iipr
20 {
21 
22 
24  public iproc::TSyncProcessorCompBase<ILineProjectionProcessor>,
25  virtual public IFeatureToImageMapper,
26  virtual public IProjectionConstraints
27 {
28 public:
30 
31  I_BEGIN_COMPONENT(CLineProjectionProcessorComp);
32  I_REGISTER_INTERFACE(IProjectionConstraints);
33  I_REGISTER_INTERFACE(IFeatureToImageMapper);
34  I_ASSIGN(m_lineParamIdAttrPtr, "LineParamId", "ID of line parameter in parameter set", true, "LineParam");
35  I_ASSIGN(m_featureMapperCompPtr, "FeatureMapper", "Map result feature to projection position, it is needed for mapping operation", false, "FeatureMapper");
36  I_END_COMPONENT;
37 
41  template <typename InputPixelType, typename DestPixel, typename CalcPixel>
43  const iimg::IBitmap& bitmap,
44  const i2d::CLine2d& bitmapLine,
45  imeas::IDataSequence& results) const;
46 
47  // reimplemented (iipr::IFeatureToImageMapper)
48  virtual bool GetImagePosition(
49  const imeas::INumericValue& feature,
50  const iprm::IParamsSet* paramsPtr,
51  i2d::CVector2d& result) const;
52 
53  // reimplemented (iipr::ILineProjectionProcessor)
54  virtual bool DoProjection(
55  const iimg::IBitmap& bitmap,
56  const i2d::CLine2d& projectionLine,
57  const IProjectionParams* paramsPtr,
58  imeas::IDataSequence& results);
59 
60  // reimplemented (iproc::IProcessor)
61  virtual int DoProcessing(
62  const iprm::IParamsSet* paramsPtr,
63  const istd::IPolymorphic* inputPtr,
64  istd::IChangeable* outputPtr,
65  ibase::IProgressManager* progressManagerPtr = NULL);
66 
67  // reimplemented (iipr::IProjectionConstraints)
68  virtual istd::CRange GetLineWidthRange() const;
69  virtual int GetMinProjectionSize() const;
70  virtual int GetMaxProjectionSize() const;
71  virtual bool IsAutoProjectionSizeSupported() const;
72 
73 protected:
74  // reimplemented (icomp::CComponentBase)
75  virtual void OnComponentCreated();
76 
77 private:
78  I_ATTR(QByteArray, m_lineParamIdAttrPtr);
79  I_REF(IFeatureToProjectionMapper, m_featureMapperCompPtr);
80 };
81 
82 
83 } // namespace iipr
84 
85 
86 #endif // !iipr_CLineProjectionProcessorComp_included
87 
88 
Simple definition macro for a synchronous processor.
virtual bool DoProjection(const iimg::IBitmap &bitmap, const i2d::CLine2d &projectionLine, const IProjectionParams *paramsPtr, imeas::IDataSequence &results)
Interface allowing mapping of extracted features to native coordinate systems.
virtual int GetMaxProjectionSize() const
Get maximal number of projection elements can be calculated by projection.
Describe parameter for projection 2D image to 1D structure.
virtual bool IsAutoProjectionSizeSupported() const
Check if automatical projection size is supported.
virtual istd::CRange GetLineWidthRange() const
Get range of possible projection line width.
virtual int GetMinProjectionSize() const
Get minimal number of projection elements can be calculated by projection.
Interface allowing mapping of extracted features to native coordinate systems.
bool DoAutosizeProjection(const iimg::IBitmap &bitmap, const i2d::CLine2d &bitmapLine, imeas::IDataSequence &results) const
Do projection along specified line with variable projection size.
virtual int DoProcessing(const iprm::IParamsSet *paramsPtr, const istd::IPolymorphic *inputPtr, istd::IChangeable *outputPtr, ibase::IProgressManager *progressManagerPtr=NULL)
iproc::TSyncProcessorCompBase< ILineProjectionProcessor > BaseClass
General parameter set containing list of numeric values.
Definition: INumericValue.h:20
General definition of sequence contains samples in regular time grid.
Definition: IDataSequence.h:20
virtual bool GetImagePosition(const imeas::INumericValue &feature, const iprm::IParamsSet *paramsPtr, i2d::CVector2d &result) const
Get position in image coordination system using position extracted from projection.

© 2007-2017 Witold Gantzke and Kirill Lepskiy