HBeadInspectionModel.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. /***********************************************************
  2. * File generated by the HALCON-Compiler hcomp version 20.11
  3. * Usage: Interface to C++
  4. *
  5. * Software by: MVTec Software GmbH, www.mvtec.com
  6. ***********************************************************/
  7. #ifndef HCPP_HBEADINSPECTIONMODEL
  8. #define HCPP_HBEADINSPECTIONMODEL
  9. namespace HalconCpp
  10. {
  11. // Represents an instance of the data structure used to inspect beads.
  12. class LIntExport HBeadInspectionModel : public HHandle
  13. {
  14. public:
  15. // Create an uninitialized instance
  16. HBeadInspectionModel():HHandle() {}
  17. // Copy constructor
  18. HBeadInspectionModel(const HBeadInspectionModel& source) : HHandle(source) {}
  19. // Copy constructor
  20. HBeadInspectionModel(const HHandle& handle);
  21. // Create HBeadInspectionModel from handle, taking ownership
  22. explicit HBeadInspectionModel(Hlong handle);
  23. bool operator==(const HHandle& obj) const
  24. {
  25. return HHandleBase::operator==(obj);
  26. }
  27. bool operator!=(const HHandle& obj) const
  28. {
  29. return HHandleBase::operator!=(obj);
  30. }
  31. protected:
  32. // Verify matching semantic type ('bead_inspection_model')!
  33. virtual void AssertType(Hphandle handle) const;
  34. public:
  35. /*****************************************************************************
  36. * Operator-based class constructors
  37. *****************************************************************************/
  38. // create_bead_inspection_model: Create a model to inspect beads or adhesive in images.
  39. explicit HBeadInspectionModel(const HXLD& BeadContour, const HTuple& TargetThickness, const HTuple& ThicknessTolerance, const HTuple& PositionTolerance, const HString& Polarity, const HTuple& GenParamName, const HTuple& GenParamValue);
  40. // create_bead_inspection_model: Create a model to inspect beads or adhesive in images.
  41. explicit HBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const HString& Polarity, const HString& GenParamName, Hlong GenParamValue);
  42. // create_bead_inspection_model: Create a model to inspect beads or adhesive in images.
  43. explicit HBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const char* Polarity, const char* GenParamName, Hlong GenParamValue);
  44. #ifdef _WIN32
  45. // create_bead_inspection_model: Create a model to inspect beads or adhesive in images.
  46. explicit HBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const wchar_t* Polarity, const wchar_t* GenParamName, Hlong GenParamValue);
  47. #endif
  48. /***************************************************************************
  49. * Operators *
  50. ***************************************************************************/
  51. // Get the value of a parameter in a specific bead inspection model.
  52. HTuple GetBeadInspectionParam(const HTuple& GenParamName) const;
  53. // Get the value of a parameter in a specific bead inspection model.
  54. HTuple GetBeadInspectionParam(const HString& GenParamName) const;
  55. // Get the value of a parameter in a specific bead inspection model.
  56. HTuple GetBeadInspectionParam(const char* GenParamName) const;
  57. #ifdef _WIN32
  58. // Get the value of a parameter in a specific bead inspection model.
  59. HTuple GetBeadInspectionParam(const wchar_t* GenParamName) const;
  60. #endif
  61. // Set parameters of the bead inspection model.
  62. void SetBeadInspectionParam(const HTuple& GenParamName, const HTuple& GenParamValue) const;
  63. // Set parameters of the bead inspection model.
  64. void SetBeadInspectionParam(const HString& GenParamName, const HString& GenParamValue) const;
  65. // Set parameters of the bead inspection model.
  66. void SetBeadInspectionParam(const char* GenParamName, const char* GenParamValue) const;
  67. #ifdef _WIN32
  68. // Set parameters of the bead inspection model.
  69. void SetBeadInspectionParam(const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
  70. #endif
  71. // Inspect beads in an image, as defined by the bead inspection model.
  72. HXLD ApplyBeadInspectionModel(const HImage& Image, HXLD* RightContour, HXLD* ErrorSegment, HTuple* ErrorType) const;
  73. // Delete the bead inspection model and free the allocated memory.
  74. void ClearBeadInspectionModel() const;
  75. // Create a model to inspect beads or adhesive in images.
  76. void CreateBeadInspectionModel(const HXLD& BeadContour, const HTuple& TargetThickness, const HTuple& ThicknessTolerance, const HTuple& PositionTolerance, const HString& Polarity, const HTuple& GenParamName, const HTuple& GenParamValue);
  77. // Create a model to inspect beads or adhesive in images.
  78. void CreateBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const HString& Polarity, const HString& GenParamName, Hlong GenParamValue);
  79. // Create a model to inspect beads or adhesive in images.
  80. void CreateBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const char* Polarity, const char* GenParamName, Hlong GenParamValue);
  81. #ifdef _WIN32
  82. // Create a model to inspect beads or adhesive in images.
  83. void CreateBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const wchar_t* Polarity, const wchar_t* GenParamName, Hlong GenParamValue);
  84. #endif
  85. };
  86. // forward declarations and types for internal array implementation
  87. template<class T> class HSmartPtr;
  88. template<class T> class HHandleBaseArrayRef;
  89. typedef HHandleBaseArrayRef<HBeadInspectionModel> HBeadInspectionModelArrayRef;
  90. typedef HSmartPtr< HBeadInspectionModelArrayRef > HBeadInspectionModelArrayPtr;
  91. // Represents multiple tool instances
  92. class LIntExport HBeadInspectionModelArray : public HHandleBaseArray
  93. {
  94. public:
  95. // Create empty array
  96. HBeadInspectionModelArray();
  97. // Create array from native array of tool instances
  98. HBeadInspectionModelArray(HBeadInspectionModel* classes, Hlong length);
  99. // Copy constructor
  100. HBeadInspectionModelArray(const HBeadInspectionModelArray &tool_array);
  101. // Destructor
  102. virtual ~HBeadInspectionModelArray();
  103. // Assignment operator
  104. HBeadInspectionModelArray &operator=(const HBeadInspectionModelArray &tool_array);
  105. // Clears array and all tool instances
  106. virtual void Clear();
  107. // Get array of native tool instances
  108. const HBeadInspectionModel* Tools() const;
  109. // Get number of tools
  110. virtual Hlong Length() const;
  111. // Create tool array from tuple of handles
  112. virtual void SetFromTuple(const HTuple& handles);
  113. // Get tuple of handles for tool array
  114. virtual HTuple ConvertToTuple() const;
  115. protected:
  116. // Smart pointer to internal data container
  117. HBeadInspectionModelArrayPtr *mArrayPtr;
  118. };
  119. }
  120. #endif