IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Pruning3dImgLvl3.h
1 // Pruning3dImgLvl3.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKIPLBASICMORPHOLOGY_PRUNING3DIMGLVL3_H__
16 #define __IPSDKIPLBASICMORPHOLOGY_PRUNING3DIMGLVL3_H__
17 
20 #include <IPSDKBaseData/Pattern/OffsetXYZ.h>
21 
22 // Attributes headers
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/DataItem/OutNbModifiedPixels.h>
24 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/ZStrip3d/InOutBinZStrip3d.h>
25 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/ZStrip3dWithKernel/InBinKnlZStrip3d.h>
26 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InRemoveSkeletonsWithoutHoles.h>
27 
28 namespace ipsdk {
29 namespace imaproc {
30 namespace morpho {
31 
34 
35 // declare processing algorithm
36 IPSDK_DECLARE_PROCESSING_ALGORITHM(IPSDKIPLBasicMorphology, Pruning3dImg,
37  ipsdk::imaproc::matchSizeAndType(_pInBinKnlZStrip3d, _pInOutBinZStrip3d),
38  (((ipsdk)(imaproc)(attr))(InBinKnlZStrip3d))
39  (((ipsdk)(imaproc)(attr))(InRemoveSkeletonsWithoutHoles))
40  (((ipsdk)(imaproc)(attr))(OutNbModifiedPixels))
41  (((ipsdk)(imaproc)(attr))(InOutBinZStrip3d)))
42 
43  // implementation of image processing data identifier retrieval method
44  // for function selector usage
46 
47  // declaration of parsed data during processing
48  IPSDK_DECLARE_ALGORITHM_PARSED_DATA(((LINESTRIP)(InBinKnlZStrip3d))
49  ((LINESTRIP)(InOutBinZStrip3d)));
50 
51 // methods
52 public:
53 
54 
55 // types
56 protected:
58  typedef std::vector<OffsetXYZ> OffsetColl;
59 
61  typedef std::vector<OffsetColl> StructuringElementColl;
62 
63 // methods
64 protected:
68 
71  void fillStructuringElements();
72 
74  void generateExceptionBGOffsets(const OffsetColl& seExcept_fg, OffsetColl& seExcept_bg);
75 
77  template <ipsdk::eInstructionSet::domain IS>
78  ipsdk::BoolResult genericProcessFunction(const ipsdk::processor::ProcessingInfo& info);
79 
80 // attributes
81 protected:
82 
84  StructuringElementColl _seColl_fg;
85  StructuringElementColl _seColl_bg;
86 
89  StructuringElementColl _seExceptColl_fg;
90  StructuringElementColl _seExceptColl_bg;
91 
93  typedef boost::scoped_array<const void*> BufColl;
94 
96  BufColl _pBufColl_fg[27];
97  BufColl _pBufColl_bg[27];
98  BufColl _pBufColl_except_fg[13];
99  BufColl _pBufColl_except_bg[13];
100 
101 };
102 
105 
106 } // end of namespace morpho
107 } // end of namespace imaproc
108 } // end of namespace ipsdk
109 
110 #endif // __IPSDKIPLBASICMORPHOLOGY_PRUNING3DIMGLVL3_H__
ipsdk::core::ExecResult preProcess()
method called before processing
Definition of import/export macro for library.
std::vector< OffsetColl > StructuringElementColl
collection of structuring elements
Definition: Pruning3dImgLvl3.h:180
boost::scoped_array< const void * > BufColl
collection of buffer pointers
Definition: Pruning3dImgLvl3.h:212
#define IPSDK_DECLARE_PROCESSING_ALGORITHM(libraryName, algoName, RuleString, attributeSeq)
#define IPSDK_DECLARE_ALGORITHM_PARSED_DATA(dataSeq)
#define IPSDK_DECLARE_NOTYPE_ALGORITHM_FUNCTION_SELECTOR()