IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
LocalExtrema2dImgLvl3.h
1 // LocalExtrema2dImgLvl3.h:
3 // ------------------------
4 //
14 
15 #ifndef __IPSDKIPLADVANCEDMORPHOLOGY_LOCALEXTREMA2DIMGLVL3_H__
16 #define __IPSDKIPLADVANCEDMORPHOLOGY_LOCALEXTREMA2DIMGLVL3_H__
17 
20 
21 // Attributes headers
22 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/YStrip2d/InYStrip2d.h>
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/YStrip2d/InOptPreviousYStrip2d.h>
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/YStrip2d/InOptPreviousBinYStrip2d.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Enumerate/InLocalExtremumType.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/OutNbModifiedPixels.h>
27 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/YStrip2d/InOutBinYStrip2d.h>
28 #include <boost/scoped_array.hpp>
29 
30 namespace ipsdk {
31 namespace imaproc {
32 namespace advmorpho {
33 
36 
37 // declare processing algorithm
38 IPSDK_DECLARE_PROCESSING_ALGORITHM(IPSDKIPLAdvancedMorphology, LocalExtrema2dImg,
39  ipsdk::imaproc::matchSize(_pInYStrip2d, _pInOutBinYStrip2d),
40  (((ipsdk)(imaproc)(attr))(InYStrip2d))
41  (((ipsdk)(imaproc)(attr))(InOptPreviousYStrip2d))
42  (((ipsdk)(imaproc)(attr))(InOptPreviousBinYStrip2d))
43  (((ipsdk)(imaproc)(attr))(InLocalExtremumType))
44  (((ipsdk)(imaproc)(attr))(OutNbModifiedPixels))
45  (((ipsdk)(imaproc)(attr))(InOutBinYStrip2d)))
46 
47  // implementation of image processing data identifier retrieval method
48  // for function selector usage
49  IPSDK_DECLARE_ALGORITHM_FUNCTION_SELECTOR(((STRIP)(InYStrip2d)));
50 
51  // declaration of parsed data during processing
52  IPSDK_DECLARE_ALGORITHM_PARSED_DATA(((LINESTRIP)(InYStrip2d))
53  ((LINESTRIP)(InOutBinYStrip2d)));
54 
55 // methods
56 public:
57 
58 protected:
60  template <typename BufInType,
61  ipsdk::eInstructionSet::domain IS>
62  ipsdk::BoolResult genericProcessFunction(const ipsdk::processor::ProcessingInfo& info);
63 
66  template <typename BufInType,
67  typename Operator,
68  ipsdk::eInstructionSet::domain IS>
69  void specificProcessFunction(const ipsdk::processor::ProcessingInfo& info);
70 
72  template <typename BufInType,
73  typename Operator,
74  ipsdk::eInstructionSet::domain IS>
75  void initPreviousData();
76 
78  template <typename BufInType,
79  typename Operator,
80  ipsdk::eInstructionSet::domain IS>
81  void updatePreviousRowData();
82 
84  void clearIntermediateData();
85 
86 // attributes
87 protected:
89  ipUInt64 _alignedRowNbData;
90 
92  ipUInt64 _sizeX;
93 
95  boost::scoped_array<ipUInt8> _pPrevRowGreyBuf;
96 
98  boost::scoped_array<ipUInt8> _pCurRowGreyBuf;
99 
101  boost::scoped_array<ipUInt8> _pPrevRowBinBuf;
102 
104  boost::scoped_array<ipUInt8> _pCurRowBinBuf;
105 
107  ipReal64 _usedBorderValue;
108 };
109 
112 
113 } // end of namespace advmorpho
114 } // end of namespace imaproc
115 } // end of namespace ipsdk
116 
117 #endif // __IPSDKIPLADVANCEDMORPHOLOGY_LOCALEXTREMA2DIMGLVL3_H__
Definition of import/export macro for library.
uint64_t ipUInt64
double ipReal64
#define IPSDK_DECLARE_PROCESSING_ALGORITHM(libraryName, algoName, RuleString, attributeSeq)
#define IPSDK_DECLARE_ALGORITHM_PARSED_DATA(dataSeq)
#define IPSDK_DECLARE_ALGORITHM_FUNCTION_SELECTOR(dataTypeSeq)