BSEImgClr.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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(System::Drawing::Rectangle^); // constructor
  13. // copy constructor
  14. CBSEImgClr(CBSEImgPtr);
  15. CBSEImgClr(CBSEImgClr^);
  16. // copy constructor
  17. CBSEImgClr(CBSEImg*);
  18. //CBSEImgClr^ operator=(const CBSEImgClr^); // =operator
  19. ~CBSEImgClr();
  20. !CBSEImgClr();
  21. // image rectangle
  22. System::Drawing::Rectangle^ GetImageRect();
  23. void SetImageRect(System::Drawing::Rectangle^ a_pRect);
  24. int GetWidth();
  25. int GetHeight();
  26. // image data
  27. void InitImageData(int imgwidth, int imgheight);
  28. cli::array<byte>^ GetImageDataPtr();
  29. void SetImageData(cli::array<byte>^ a_pnImageData, int imgwidth, int imgheight);
  30. int GetImageSize();
  31. // BSE chart
  32. // NOTE: to use chart data, call SetChartData method first!
  33. bool SetChartData();
  34. void GetBSEChart(cli::array<WORD>^ %);
  35. long CalBSEChartHigh();
  36. long CalBSEChartLow();
  37. // cal BSE value by position
  38. int GetBSEValue(System::Drawing::Point^ a_position);
  39. int GetBSEValue(const int a_nX, const int a_nY);
  40. void SetBSEValue(const int a_nX, const int a_nY, int value);
  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. CBSEImgClr();
  49. CBSEImgPtr *m_LpBSEImg;
  50. };
  51. }