CImageHistogramSupplierComp.h
Go to the documentation of this file.
1 #ifndef iipr_CImageHistogramSupplierComp_included
2 #define iipr_CImageHistogramSupplierComp_included
3 
4 
5 // ACF includes
7 #include "i2d/CVector2d.h"
9 #include "iprm/IParamsSet.h"
11 
12 // ACF-Solutions includes
13 #include "iproc/IProcessor.h"
14 #include "iproc/ISupplier.h"
18 #include "iimg/IBitmapProvider.h"
19 
20 
21 namespace iipr
22 {
23 
24 
26  public iproc::TSupplierCompWrap< imod::TModelWrap<imeas::CSimpleSamplesSequence32> >,
27  virtual public imeas::IDataSequenceProvider
28 {
29 public:
31 
32  I_BEGIN_COMPONENT(CImageHistogramSupplierComp);
33  I_REGISTER_INTERFACE(imeas::IDataSequenceProvider);
34  I_ASSIGN(m_bitmapProviderCompPtr, "BitmapProvider", "Provide image to analyse", true, "BitmapProvider");
35  I_ASSIGN_TO(m_bitmapSupplierCompPtr, m_bitmapProviderCompPtr, false);
36  I_ASSIGN_TO(m_bitmapProviderModelCompPtr, m_bitmapProviderCompPtr, false);
37  I_ASSIGN(m_histogramProcessorCompPtr, "HistogramProcessor", "Calculate histogram of the image", true, "HistogramProcessor");
38  I_END_COMPONENT;
39 
40  // reimplemented (imeas::IDataSequenceProvider)
41  virtual const imeas::IDataSequence* GetDataSequence() const;
42 
43 protected:
44  // reimplemented (iproc::TSupplierCompWrap)
46 
47  // reimplemented (icomp::CComponentBase)
48  virtual void OnComponentCreated();
49  virtual void OnComponentDestroyed();
50 
51 private:
52  I_REF(iimg::IBitmapProvider, m_bitmapProviderCompPtr);
53  I_REF(iproc::ISupplier, m_bitmapSupplierCompPtr);
54  I_REF(imod::IModel, m_bitmapProviderModelCompPtr);
55  I_REF(iproc::IProcessor, m_histogramProcessorCompPtr);
56 };
57 
58 
59 } // namespace iipr
60 
61 
62 #endif // !iipr_CImageHistogramSupplierComp_included
63 
64 
I_ASSIGN_TO(m_bitmapSupplierCompPtr, m_bitmapProviderCompPtr, false)
virtual int ProduceObject(imod::TModelWrap< imeas::CSimpleSamplesSequence32 > &result) const
Produce single object.
Simple data sequence provider.
Base interface for suppliers providing synchrone processing of single object with "pull data" model...
Definition: ISupplier.h:22
virtual const imeas::IDataSequence * GetDataSequence() const
Get access to produced line projection object.
iproc::TSupplierCompWrap< imod::TModelWrap< imeas::CSimpleSamplesSequence32 > > BaseClass
Interface for all synchrone and assynchrone processors with "push data" model.
Definition: IProcessor.h:24
General definition of sequence contains samples in regular time grid.
Definition: IDataSequence.h:20
Standard implementation of interface iproc::ISupplier with preparation for component implementation...

© 2007-2011 Witold Gantzke and Kirill Lepskiy