HStructuredLightModel.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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_HSTRUCTUREDLIGHTMODEL
  8. #define HCPP_HSTRUCTUREDLIGHTMODEL
  9. namespace HalconCpp
  10. {
  11. // Represents an instance of a structured light model.
  12. class LIntExport HStructuredLightModel : public HHandle
  13. {
  14. public:
  15. // Create an uninitialized instance
  16. HStructuredLightModel():HHandle() {}
  17. // Copy constructor
  18. HStructuredLightModel(const HStructuredLightModel& source) : HHandle(source) {}
  19. // Copy constructor
  20. HStructuredLightModel(const HHandle& handle);
  21. // Create HStructuredLightModel from handle, taking ownership
  22. explicit HStructuredLightModel(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 ('structured_light_model')!
  33. virtual void AssertType(Hphandle handle) const;
  34. public:
  35. // Deep copy of all data represented by this object instance
  36. HStructuredLightModel Clone() const;
  37. /*****************************************************************************
  38. * Operator-based class constructors
  39. *****************************************************************************/
  40. // create_structured_light_model: Create a structured light model.
  41. explicit HStructuredLightModel(const HString& ModelType);
  42. // create_structured_light_model: Create a structured light model.
  43. explicit HStructuredLightModel(const char* ModelType);
  44. #ifdef _WIN32
  45. // create_structured_light_model: Create a structured light model.
  46. explicit HStructuredLightModel(const wchar_t* ModelType);
  47. #endif
  48. /***************************************************************************
  49. * Operators *
  50. ***************************************************************************/
  51. // Clear a structured light model and free the allocated memory.
  52. static void ClearStructuredLightModel(const HStructuredLightModelArray& StructuredLightModel);
  53. // Clear a structured light model and free the allocated memory.
  54. void ClearStructuredLightModel() const;
  55. // Create a structured light model.
  56. void CreateStructuredLightModel(const HString& ModelType);
  57. // Create a structured light model.
  58. void CreateStructuredLightModel(const char* ModelType);
  59. #ifdef _WIN32
  60. // Create a structured light model.
  61. void CreateStructuredLightModel(const wchar_t* ModelType);
  62. #endif
  63. // Decode the camera images acquired with a structured light setup.
  64. void DecodeStructuredLightPattern(const HImage& CameraImages) const;
  65. // Deserialize a structured light model.
  66. void DeserializeStructuredLightModel(const HSerializedItem& SerializedItemHandle);
  67. // Generate the pattern images to be displayed in a structured light setup.
  68. HImage GenStructuredLightPattern() const;
  69. // Query parameters of a structured light model.
  70. HTuple GetStructuredLightModelParam(const HTuple& GenParamName) const;
  71. // Query parameters of a structured light model.
  72. HTuple GetStructuredLightModelParam(const HString& GenParamName) const;
  73. // Query parameters of a structured light model.
  74. HTuple GetStructuredLightModelParam(const char* GenParamName) const;
  75. #ifdef _WIN32
  76. // Query parameters of a structured light model.
  77. HTuple GetStructuredLightModelParam(const wchar_t* GenParamName) const;
  78. #endif
  79. // Get (intermediate) iconic results of a structured light model.
  80. HObject GetStructuredLightObject(const HTuple& ObjectName) const;
  81. // Get (intermediate) iconic results of a structured light model.
  82. HObject GetStructuredLightObject(const HString& ObjectName) const;
  83. // Get (intermediate) iconic results of a structured light model.
  84. HObject GetStructuredLightObject(const char* ObjectName) const;
  85. #ifdef _WIN32
  86. // Get (intermediate) iconic results of a structured light model.
  87. HObject GetStructuredLightObject(const wchar_t* ObjectName) const;
  88. #endif
  89. // Read a structured light model from a file.
  90. void ReadStructuredLightModel(const HString& FileName);
  91. // Read a structured light model from a file.
  92. void ReadStructuredLightModel(const char* FileName);
  93. #ifdef _WIN32
  94. // Read a structured light model from a file.
  95. void ReadStructuredLightModel(const wchar_t* FileName);
  96. #endif
  97. // Serialize a structured light model.
  98. HSerializedItem SerializeStructuredLightModel() const;
  99. // Set parameters of a structured light model.
  100. void SetStructuredLightModelParam(const HTuple& GenParamName, const HTuple& GenParamValue) const;
  101. // Set parameters of a structured light model.
  102. void SetStructuredLightModelParam(const HString& GenParamName, Hlong GenParamValue) const;
  103. // Set parameters of a structured light model.
  104. void SetStructuredLightModelParam(const char* GenParamName, Hlong GenParamValue) const;
  105. #ifdef _WIN32
  106. // Set parameters of a structured light model.
  107. void SetStructuredLightModelParam(const wchar_t* GenParamName, Hlong GenParamValue) const;
  108. #endif
  109. // Write a structured light model to a file.
  110. void WriteStructuredLightModel(const HString& FileName) const;
  111. // Write a structured light model to a file.
  112. void WriteStructuredLightModel(const char* FileName) const;
  113. #ifdef _WIN32
  114. // Write a structured light model to a file.
  115. void WriteStructuredLightModel(const wchar_t* FileName) const;
  116. #endif
  117. };
  118. // forward declarations and types for internal array implementation
  119. template<class T> class HSmartPtr;
  120. template<class T> class HHandleBaseArrayRef;
  121. typedef HHandleBaseArrayRef<HStructuredLightModel> HStructuredLightModelArrayRef;
  122. typedef HSmartPtr< HStructuredLightModelArrayRef > HStructuredLightModelArrayPtr;
  123. // Represents multiple tool instances
  124. class LIntExport HStructuredLightModelArray : public HHandleBaseArray
  125. {
  126. public:
  127. // Create empty array
  128. HStructuredLightModelArray();
  129. // Create array from native array of tool instances
  130. HStructuredLightModelArray(HStructuredLightModel* classes, Hlong length);
  131. // Copy constructor
  132. HStructuredLightModelArray(const HStructuredLightModelArray &tool_array);
  133. // Destructor
  134. virtual ~HStructuredLightModelArray();
  135. // Assignment operator
  136. HStructuredLightModelArray &operator=(const HStructuredLightModelArray &tool_array);
  137. // Clears array and all tool instances
  138. virtual void Clear();
  139. // Get array of native tool instances
  140. const HStructuredLightModel* Tools() const;
  141. // Get number of tools
  142. virtual Hlong Length() const;
  143. // Create tool array from tuple of handles
  144. virtual void SetFromTuple(const HTuple& handles);
  145. // Get tuple of handles for tool array
  146. virtual HTuple ConvertToTuple() const;
  147. protected:
  148. // Smart pointer to internal data container
  149. HStructuredLightModelArrayPtr *mArrayPtr;
  150. };
  151. }
  152. #endif