HGenericShapeModelResult.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /***********************************************************
  2. * File generated by the HALCON-Compiler hcomp version 22.05
  3. * Usage: Interface to C++
  4. *
  5. * Software by: MVTec Software GmbH, www.mvtec.com
  6. ***********************************************************/
  7. #ifndef HCPP_HGENERICSHAPEMODELRESULT
  8. #define HCPP_HGENERICSHAPEMODELRESULT
  9. namespace HalconCpp
  10. {
  11. // Represents an instance of a result of generic shape matching.
  12. class LIntExport HGenericShapeModelResult : public HHandle
  13. {
  14. public:
  15. // Create an uninitialized instance
  16. HGenericShapeModelResult():HHandle() {}
  17. // Copy constructor
  18. HGenericShapeModelResult(const HGenericShapeModelResult& source) : HHandle(source) {}
  19. // Copy constructor
  20. HGenericShapeModelResult(const HHandle& handle);
  21. // Create HGenericShapeModelResult from handle, taking ownership
  22. explicit HGenericShapeModelResult(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 ('generic_shape_model_result')!
  33. virtual void AssertType(Hphandle handle) const;
  34. public:
  35. /***************************************************************************
  36. * Operators *
  37. ***************************************************************************/
  38. // Find the best matches of one or multiple shape models in an image.
  39. Hlong FindGenericShapeModel(const HObject& SearchImage, const HShapeModelArray& ModelID);
  40. // Find the best matches of one or multiple shape models in an image.
  41. Hlong FindGenericShapeModel(const HObject& SearchImage, const HShapeModel& ModelID);
  42. // Get alphanumerical values from a shape matching result.
  43. HTuple GetGenericShapeModelResult(const HTuple& MatchSelector, const HString& GenParamName) const;
  44. // Get alphanumerical values from a shape matching result.
  45. HTuple GetGenericShapeModelResult(const HTuple& MatchSelector, const char* GenParamName) const;
  46. #ifdef _WIN32
  47. // Get alphanumerical values from a shape matching result.
  48. HTuple GetGenericShapeModelResult(const HTuple& MatchSelector, const wchar_t* GenParamName) const;
  49. #endif
  50. // Get objects from a shape matching result.
  51. HObject GetGenericShapeModelResultObject(const HTuple& MatchSelector, const HString& GenParamName) const;
  52. // Get objects from a shape matching result.
  53. HObject GetGenericShapeModelResultObject(const HTuple& MatchSelector, const char* GenParamName) const;
  54. #ifdef _WIN32
  55. // Get objects from a shape matching result.
  56. HObject GetGenericShapeModelResultObject(const HTuple& MatchSelector, const wchar_t* GenParamName) const;
  57. #endif
  58. };
  59. // forward declarations and types for internal array implementation
  60. template<class T> class HSmartPtr;
  61. template<class T> class HHandleBaseArrayRef;
  62. typedef HHandleBaseArrayRef<HGenericShapeModelResult> HGenericShapeModelResultArrayRef;
  63. typedef HSmartPtr< HGenericShapeModelResultArrayRef > HGenericShapeModelResultArrayPtr;
  64. // Represents multiple tool instances
  65. class LIntExport HGenericShapeModelResultArray : public HHandleBaseArray
  66. {
  67. public:
  68. // Create empty array
  69. HGenericShapeModelResultArray();
  70. // Create array from native array of tool instances
  71. HGenericShapeModelResultArray(const HGenericShapeModelResult* classes, Hlong length);
  72. // Copy constructor
  73. HGenericShapeModelResultArray(const HGenericShapeModelResultArray &tool_array);
  74. // Destructor
  75. virtual ~HGenericShapeModelResultArray();
  76. // Assignment operator
  77. HGenericShapeModelResultArray &operator=(const HGenericShapeModelResultArray &tool_array);
  78. // Clears array and all tool instances
  79. virtual void Clear();
  80. // Get array of native tool instances
  81. const HGenericShapeModelResult* Tools() const;
  82. // Get number of tools
  83. virtual Hlong Length() const;
  84. // Create tool array from tuple of handles
  85. virtual void SetFromTuple(const HTuple& handles);
  86. // Get tuple of handles for tool array
  87. virtual HTuple ConvertToTuple() const;
  88. protected:
  89. // Smart pointer to internal data container
  90. HGenericShapeModelResultArrayPtr *mArrayPtr;
  91. };
  92. }
  93. #endif