BSEImgClr.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #pragma once
  2. #include "BSEImg.h"
  3. using namespace System;
  4. using namespace System::Drawing;
  5. namespace OTSCLRINTERFACE
  6. {
  7. using namespace OTSDATA;
  8. extern const unsigned int CHART_NUM;
  9. public ref class CBSEImgClr : public Object
  10. {
  11. public:
  12. CBSEImgClr();
  13. CBSEImgClr(System::Drawing::Rectangle^); // constructor
  14. // copy constructor
  15. CBSEImgClr(CBSEImgPtr);
  16. CBSEImgClr(CBSEImgClr^);
  17. // copy constructor
  18. CBSEImgClr(CBSEImg*);
  19. //CBSEImgClr^ operator=(const CBSEImgClr^); // =operator
  20. ~CBSEImgClr();
  21. !CBSEImgClr();
  22. // image rectangle
  23. System::Drawing::Rectangle^ GetImageRect();
  24. void SetImageRect(System::Drawing::Rectangle^ a_pRect);
  25. int GetWidth();
  26. int GetHeight();
  27. // image data
  28. void InitImageData(int imgwidth, int imgheight);
  29. cli::array<byte>^ GetImageDataPtr();
  30. void SetImageData(cli::array<byte>^ a_pnImageData, int imgwidth, int imgheight);
  31. int GetImageSize();
  32. // BSE chart
  33. // NOTE: to use chart data, call SetChartData method first!
  34. bool SetChartData();
  35. void GetBSEChart(cli::array<WORD>^ %);
  36. long CalBSEChartHigh();
  37. long CalBSEChartLow();
  38. // cal BSE value by position
  39. int GetBSEValue(System::Drawing::Point^ a_position);
  40. int GetBSEValue(const int a_nX, const int a_nY);
  41. int GetValueDirect(System::Drawing::Point^ a_position);
  42. int GetValueDirectF(int inX, int inY);
  43. bool DoesContainPixelValue(int inValue, int a_nPixel);
  44. // cal area
  45. DWORD CalArea();
  46. CBSEImgPtr GetBSEImgPtr();
  47. protected:
  48. CBSEImgPtr *m_LpBSEImg;
  49. };
  50. }