CImageRegionProcessorCompBase.h
Go to the documentation of this file.
1 #ifndef iipr_CImageRegionProcessorCompBase_included
2 #define iipr_CImageRegionProcessorCompBase_included
3 
4 
5 // ACF includes
8 
9 
10 namespace i2d
11 {
12  class IObject2d;
13 }
14 
15 
16 namespace iimg
17 {
18  class IBitmap;
19 }
20 
21 
22 namespace iipr
23 {
24 
25 
30 {
31 public:
33 
34  I_BEGIN_BASE_COMPONENT(CImageRegionProcessorCompBase);
35  I_ASSIGN(m_aoiParamIdAttrPtr, "AoiParamId", "ID of the AOI region in the parameter set (i2d::IObject2d)", true, "AoiParams");
36  I_ASSIGN(m_defaultAoiCompPtr, "DefaultAoi", "Area of interest used if not specified in parameters", false, "DefaultAoi");
37  I_ASSIGN(m_allowEmptyRegionAttrPtr, "AllowEmptyAoi", "If enabled the full image area is used of no AOI was set", true, false);
38  I_END_COMPONENT;
39 
40  // reimplemented (iproc::IProcessor)
41  virtual int DoProcessing(
42  const iprm::IParamsSet* paramsPtr,
43  const istd::IPolymorphic* inputPtr,
44  istd::IChangeable* outputPtr,
45  ibase::IProgressManager* progressManagerPtr = NULL);
46 
47 protected:
48  // abstract methods
52  virtual bool ProcessImageRegion(
53  const iimg::IBitmap& inputBitmap,
54  const iprm::IParamsSet* paramsPtr,
55  const i2d::IObject2d* aoiPtr,
56  istd::IChangeable* outputPtr) const = 0;
57 
58 protected:
59  I_ATTR(QByteArray, m_aoiParamIdAttrPtr);
60  I_REF(i2d::IObject2d, m_defaultAoiCompPtr);
61  I_ATTR(bool, m_allowEmptyRegionAttrPtr);
62 };
63 
64 
65 } // namespace iipr
66 
67 
68 #endif // !iipr_CImageRegionProcessorCompBase_included
69 
70 
Simple definition macro for a synchronous processor.
virtual int DoProcessing(const iprm::IParamsSet *paramsPtr, const istd::IPolymorphic *inputPtr, istd::IChangeable *outputPtr, ibase::IProgressManager *progressManagerPtr=NULL)
virtual bool ProcessImageRegion(const iimg::IBitmap &inputBitmap, const iprm::IParamsSet *paramsPtr, const i2d::IObject2d *aoiPtr, istd::IChangeable *outputPtr) const =0
Process the defined image region.
Basic implementation for a image region processor.

© 2007-2017 Witold Gantzke and Kirill Lepskiy