HGnuplot.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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_HGNUPLOT
  8. #define HCPP_HGNUPLOT
  9. namespace HalconCpp
  10. {
  11. // Represents an instance of a connection to a gnuplot process.
  12. class LIntExport HGnuplot : public HHandle
  13. {
  14. public:
  15. // Create an uninitialized instance
  16. HGnuplot():HHandle() {}
  17. // Copy constructor
  18. HGnuplot(const HGnuplot& source) : HHandle(source) {}
  19. // Copy constructor
  20. HGnuplot(const HHandle& handle);
  21. // Create HGnuplot from handle, taking ownership
  22. explicit HGnuplot(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 ('gnuplot')!
  33. virtual void AssertType(Hphandle handle) const;
  34. public:
  35. /***************************************************************************
  36. * Operators *
  37. ***************************************************************************/
  38. // Plot a function using gnuplot.
  39. void GnuplotPlotFunct1d(const HFunction1D& Function) const;
  40. // Plot control values using gnuplot.
  41. void GnuplotPlotCtrl(const HTuple& Values) const;
  42. // Visualize images using gnuplot.
  43. void GnuplotPlotImage(const HImage& Image, Hlong SamplesX, Hlong SamplesY, const HTuple& ViewRotX, const HTuple& ViewRotZ, const HString& Hidden3D) const;
  44. // Visualize images using gnuplot.
  45. void GnuplotPlotImage(const HImage& Image, Hlong SamplesX, Hlong SamplesY, double ViewRotX, double ViewRotZ, const HString& Hidden3D) const;
  46. // Visualize images using gnuplot.
  47. void GnuplotPlotImage(const HImage& Image, Hlong SamplesX, Hlong SamplesY, double ViewRotX, double ViewRotZ, const char* Hidden3D) const;
  48. #ifdef _WIN32
  49. // Visualize images using gnuplot.
  50. void GnuplotPlotImage(const HImage& Image, Hlong SamplesX, Hlong SamplesY, double ViewRotX, double ViewRotZ, const wchar_t* Hidden3D) const;
  51. #endif
  52. // Close all open gnuplot files or terminate an active gnuplot sub-process.
  53. void GnuplotClose() const;
  54. // Open a gnuplot file for visualization of images and control values.
  55. void GnuplotOpenFile(const HString& FileName);
  56. // Open a gnuplot file for visualization of images and control values.
  57. void GnuplotOpenFile(const char* FileName);
  58. #ifdef _WIN32
  59. // Open a gnuplot file for visualization of images and control values.
  60. void GnuplotOpenFile(const wchar_t* FileName);
  61. #endif
  62. // Open a pipe to a gnuplot process for visualization of images and control values.
  63. void GnuplotOpenPipe();
  64. };
  65. // forward declarations and types for internal array implementation
  66. template<class T> class HSmartPtr;
  67. template<class T> class HHandleBaseArrayRef;
  68. typedef HHandleBaseArrayRef<HGnuplot> HGnuplotArrayRef;
  69. typedef HSmartPtr< HGnuplotArrayRef > HGnuplotArrayPtr;
  70. // Represents multiple tool instances
  71. class LIntExport HGnuplotArray : public HHandleBaseArray
  72. {
  73. public:
  74. // Create empty array
  75. HGnuplotArray();
  76. // Create array from native array of tool instances
  77. HGnuplotArray(HGnuplot* classes, Hlong length);
  78. // Copy constructor
  79. HGnuplotArray(const HGnuplotArray &tool_array);
  80. // Destructor
  81. virtual ~HGnuplotArray();
  82. // Assignment operator
  83. HGnuplotArray &operator=(const HGnuplotArray &tool_array);
  84. // Clears array and all tool instances
  85. virtual void Clear();
  86. // Get array of native tool instances
  87. const HGnuplot* Tools() const;
  88. // Get number of tools
  89. virtual Hlong Length() const;
  90. // Create tool array from tuple of handles
  91. virtual void SetFromTuple(const HTuple& handles);
  92. // Get tuple of handles for tool array
  93. virtual HTuple ConvertToTuple() const;
  94. protected:
  95. // Smart pointer to internal data container
  96. HGnuplotArrayPtr *mArrayPtr;
  97. };
  98. }
  99. #endif