HScatteredDataInterpolator.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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_HSCATTEREDDATAINTERPOLATOR
  8. #define HCPP_HSCATTEREDDATAINTERPOLATOR
  9. namespace HalconCpp
  10. {
  11. // Represents an instance of a scattered data interpolator.
  12. class LIntExport HScatteredDataInterpolator : public HHandle
  13. {
  14. public:
  15. // Create an uninitialized instance
  16. HScatteredDataInterpolator():HHandle() {}
  17. // Copy constructor
  18. HScatteredDataInterpolator(const HScatteredDataInterpolator& source) : HHandle(source) {}
  19. // Copy constructor
  20. HScatteredDataInterpolator(const HHandle& handle);
  21. // Create HScatteredDataInterpolator from handle, taking ownership
  22. explicit HScatteredDataInterpolator(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 ('scattered_data_interpolator')!
  33. virtual void AssertType(Hphandle handle) const;
  34. public:
  35. /*****************************************************************************
  36. * Operator-based class constructors
  37. *****************************************************************************/
  38. // create_scattered_data_interpolator: Creates an interpolator for the interpolation of scattered data.
  39. explicit HScatteredDataInterpolator(const HString& Method, const HTuple& Rows, const HTuple& Columns, const HTuple& Values, const HTuple& GenParamName, const HTuple& GenParamValue);
  40. // create_scattered_data_interpolator: Creates an interpolator for the interpolation of scattered data.
  41. explicit HScatteredDataInterpolator(const char* Method, const HTuple& Rows, const HTuple& Columns, const HTuple& Values, const HTuple& GenParamName, const HTuple& GenParamValue);
  42. #ifdef _WIN32
  43. // create_scattered_data_interpolator: Creates an interpolator for the interpolation of scattered data.
  44. explicit HScatteredDataInterpolator(const wchar_t* Method, const HTuple& Rows, const HTuple& Columns, const HTuple& Values, const HTuple& GenParamName, const HTuple& GenParamValue);
  45. #endif
  46. /***************************************************************************
  47. * Operators *
  48. ***************************************************************************/
  49. // Clear a scattered data interpolator.
  50. static void ClearScatteredDataInterpolator(const HScatteredDataInterpolatorArray& ScatteredDataInterpolatorHandle);
  51. // Clear a scattered data interpolator.
  52. void ClearScatteredDataInterpolator() const;
  53. // Interpolation of scattered data using a scattered data interpolator.
  54. HTuple InterpolateScatteredData(const HTuple& Row, const HTuple& Column) const;
  55. // Interpolation of scattered data using a scattered data interpolator.
  56. double InterpolateScatteredData(double Row, double Column) const;
  57. // Creates an interpolator for the interpolation of scattered data.
  58. void CreateScatteredDataInterpolator(const HString& Method, const HTuple& Rows, const HTuple& Columns, const HTuple& Values, const HTuple& GenParamName, const HTuple& GenParamValue);
  59. // Creates an interpolator for the interpolation of scattered data.
  60. void CreateScatteredDataInterpolator(const char* Method, const HTuple& Rows, const HTuple& Columns, const HTuple& Values, const HTuple& GenParamName, const HTuple& GenParamValue);
  61. #ifdef _WIN32
  62. // Creates an interpolator for the interpolation of scattered data.
  63. void CreateScatteredDataInterpolator(const wchar_t* Method, const HTuple& Rows, const HTuple& Columns, const HTuple& Values, const HTuple& GenParamName, const HTuple& GenParamValue);
  64. #endif
  65. };
  66. // forward declarations and types for internal array implementation
  67. template<class T> class HSmartPtr;
  68. template<class T> class HHandleBaseArrayRef;
  69. typedef HHandleBaseArrayRef<HScatteredDataInterpolator> HScatteredDataInterpolatorArrayRef;
  70. typedef HSmartPtr< HScatteredDataInterpolatorArrayRef > HScatteredDataInterpolatorArrayPtr;
  71. // Represents multiple tool instances
  72. class LIntExport HScatteredDataInterpolatorArray : public HHandleBaseArray
  73. {
  74. public:
  75. // Create empty array
  76. HScatteredDataInterpolatorArray();
  77. // Create array from native array of tool instances
  78. HScatteredDataInterpolatorArray(HScatteredDataInterpolator* classes, Hlong length);
  79. // Copy constructor
  80. HScatteredDataInterpolatorArray(const HScatteredDataInterpolatorArray &tool_array);
  81. // Destructor
  82. virtual ~HScatteredDataInterpolatorArray();
  83. // Assignment operator
  84. HScatteredDataInterpolatorArray &operator=(const HScatteredDataInterpolatorArray &tool_array);
  85. // Clears array and all tool instances
  86. virtual void Clear();
  87. // Get array of native tool instances
  88. const HScatteredDataInterpolator* Tools() const;
  89. // Get number of tools
  90. virtual Hlong Length() const;
  91. // Create tool array from tuple of handles
  92. virtual void SetFromTuple(const HTuple& handles);
  93. // Get tuple of handles for tool array
  94. virtual HTuple ConvertToTuple() const;
  95. protected:
  96. // Smart pointer to internal data container
  97. HScatteredDataInterpolatorArrayPtr *mArrayPtr;
  98. };
  99. }
  100. #endif