IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
DistanceMap3dImgLvl3.h
1 // DistanceMap3dImgLvl3.h:
3 // -----------------------
4 //
14 
15 #ifndef __IPSDKIPLBASICMORPHOLOGY_DISTANCEMAP3DIMGLVL3_H__
16 #define __IPSDKIPLBASICMORPHOLOGY_DISTANCEMAP3DIMGLVL3_H__
17 
20 
21 // Attributes headers
22 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Strip/YStrip3d/InOutDistYStrip3d.h>
23 #include <IPSDKIPL/IPSDKIPLAttributes/Attribute/Value/InOptMaxDistance.h>
24 #include <boost/scoped_array.hpp>
25 
26 namespace ipsdk {
27 namespace imaproc {
28 namespace morpho {
29 
32 
33 // declare processing algorithm
34 IPSDK_DECLARE_PROCESSING_ALGORITHM(IPSDKIPLBasicMorphology, DistanceMap3dImg,
36  (((ipsdk)(imaproc)(attr))(InOutDistYStrip3d))
37  (((ipsdk)(imaproc)(attr))(InOptMaxDistance)))
38 
39  // implementation of image processing data identifier retrieval method
40  // for function selector usage
41  IPSDK_DECLARE_ALGORITHM_FUNCTION_SELECTOR(((STRIP)(InOutDistYStrip3d)));
42 
43  // declaration of parsed data during processing
44  IPSDK_DECLARE_ALGORITHM_PARSED_DATA(((RAWSTRIP)(InOutDistYStrip3d)));
45 
46 // methods
47 public:
48 
49 protected:
51  struct DistInfo
52  {
55  ipsdk::ipUInt64 _cfpXP1;
56 
61  ipsdk::ipUInt64 _intersectXP1;
62 
65  ipsdk::ipReal64 _value;
66  };
67 
69  template <typename BufOutType,
70  ipsdk::eInstructionSet::domain IS>
71  ipsdk::BoolResult genericProcessFunction(const ipsdk::processor::ProcessingInfo& info);
72 
75  template <typename BufType>
76  void updateOutputBuffer(const boost::scoped_array<DistanceMap3dImgLvl3::DistInfo>& pDistInfoColl, DistInfo* pLastDistInfo, const ipUInt64 x, const ipUInt64 sizeZ);
77 
80  template <typename BufType>
81  void updateOutputBufferWithConstraint(const boost::scoped_array<DistanceMap3dImgLvl3::DistInfo>& pDistInfoColl, DistInfo* pLastDistInfo, const ipUInt64 x, const ipUInt64 sizeZ, const ipReal32 maxDistance);
82 
83 
84 // attributes
85 protected:
87  boost::scoped_array<DistInfo> _pDistInfoColl;
88 };
89 
92 
93 } // end of namespace morpho
94 } // end of namespace imaproc
95 } // end of namespace ipsdk
96 
97 #endif // __IPSDKIPLBASICMORPHOLOGY_DISTANCEMAP3DIMGLVL3_H__
uint64_t ipUInt64
IPSDKBASEPROCESSING_API RulePtr none()
double ipReal64
Definition of import/export macro for library.
#define IPSDK_DECLARE_PROCESSING_ALGORITHM(libraryName, algoName, RuleString, attributeSeq)
#define IPSDK_DECLARE_ALGORITHM_PARSED_DATA(dataSeq)
#define IPSDK_DECLARE_ALGORITHM_FUNCTION_SELECTOR(dataTypeSeq)
float ipReal32