OTSImageScanParam.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. #pragma once
  2. #include "otsdataconst.h"
  3. #include "XMLSerialization.h"
  4. namespace OTSIMGPROC
  5. {
  6. using namespace OTSDATA;
  7. // stop mode
  8. __declspec(dllexport) const OTS_MEASURE_STOP_MODE DEFUALT_MEASURE_STOP_MODE = OTS_MEASURE_STOP_MODE::CoverMode;
  9. // stop parameters
  10. __declspec(dllexport) const int DEFUALT_PARAM_FIELD = 500;
  11. __declspec(dllexport) const int DEFUALT_PARAM_TIME = 300;
  12. __declspec(dllexport) const int DEFUALT_PARAM_PARTICLE = 5000;
  13. // image mode
  14. __declspec(dllexport) const OTS_GET_IMAGE_MODE DEFAULT_IMAGEMODE = OTS_GET_IMAGE_MODE::SpiralSequnce;
  15. // scan speed
  16. __declspec(dllexport) const OTS_THREE_TIES_OPTIONS DEFAULE_SCAN_SPEED = OTS_THREE_TIES_OPTIONS::TIE2;
  17. // image size
  18. __declspec(dllexport) const OTS_ImageResolution_OPTIONS DEFAULE_IMAGE_SIZE = OTS_ImageResolution_OPTIONS::_1024_768;
  19. class __declspec(dllexport) COTSImageScanParam : public xmls::ISlo
  20. {
  21. public:
  22. COTSImageScanParam(); // constructor
  23. COTSImageScanParam(const COTSImageScanParam&); // copy constructor
  24. COTSImageScanParam(COTSImageScanParam*); // copy constructor
  25. COTSImageScanParam& operator=(const COTSImageScanParam&); // =operator
  26. BOOL operator==(const COTSImageScanParam&); // =operator
  27. virtual ~COTSImageScanParam(); // detractor
  28. // serialization
  29. void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
  30. //测量终止方式
  31. OTS_MEASURE_STOP_MODE GetStopMode() { return m_nStopMode;}
  32. void SetStopMode(OTS_MEASURE_STOP_MODE a_nStopMode) { m_nStopMode = a_nStopMode; }
  33. //测量时间
  34. int GetStopParamMeasTime() { return m_nStopParamMeasTime; }
  35. void SetStopParamMeasTime(int a_nStopParamMeasTime) { m_nStopParamMeasTime = a_nStopParamMeasTime; }
  36. //帧图数
  37. int GetStopParamFields() { return m_nStopParamFields; }
  38. void SetStopParamFields(int a_nStopParamFields) { m_nStopParamFields = a_nStopParamFields; }
  39. //夹杂物数
  40. int GetStopParamParticles() { return m_nStopParamParticles; }
  41. void SetStopParamParticles(int a_nStopParamParticles) { m_nStopParamParticles = a_nStopParamParticles; }
  42. //取图方式
  43. OTS_GET_IMAGE_MODE GetStartImageMode() { return m_nSatrtImageMode; }
  44. void SetStartImageMode(OTS_GET_IMAGE_MODE a_nSatrtImageMode) { m_nSatrtImageMode = a_nSatrtImageMode; }
  45. //扫描图尺寸
  46. OTS_ImageResolution_OPTIONS GetImageResolutionEnumNo() { return m_nImageResolution; }
  47. void SetImagePixelSize(OTS_ImageResolution_OPTIONS a_nImagePixelSize) { m_nImageResolution = a_nImagePixelSize; }
  48. //扫描图精度
  49. OTS_THREE_TIES_OPTIONS GetScanImageSpeed() { return m_nScanImageSpeed; }
  50. void SetScanImageSpeed(OTS_THREE_TIES_OPTIONS a_nScanImageSpeed) { m_nScanImageSpeed = a_nScanImageSpeed; }
  51. CSize GetImageResolution() {
  52. return CSize(m_ImageResolutionWidth, m_ImageResolutionHeight);
  53. }
  54. protected:
  55. // cleanup
  56. void Cleanup();
  57. // initialization
  58. void Init();
  59. // duplication
  60. void Duplicate(const COTSImageScanParam& a_oSource);
  61. private:
  62. OTS_MEASURE_STOP_MODE m_nStopMode; //测量终止方式
  63. //BOOL m_bShowStopMode;
  64. int m_nStopParamMeasTime; //测量时间
  65. //BOOL m_bShowMeasTime;
  66. int m_nStopParamFields; //帧图数
  67. //BOOL m_bShowParamFields;
  68. int m_nStopParamParticles; //夹杂物数
  69. //BOOL m_bShowParticles;
  70. OTS_GET_IMAGE_MODE m_nSatrtImageMode; //取图方式
  71. //BOOL m_bShowStartImageMode;
  72. OTS_THREE_TIES_OPTIONS m_nScanImageSpeed; //扫描图精度
  73. //BOOL m_bShowImageSpeed;
  74. OTS_ImageResolution_OPTIONS m_nImageResolution; //扫描图尺寸
  75. int m_ImageResolutionWidth;
  76. int m_ImageResolutionHeight;
  77. //BOOL m_bShowPixelSize;
  78. };
  79. typedef std::shared_ptr<COTSImageScanParam> __declspec(dllexport) COTSImageScanParamPtr;
  80. typedef std::vector<COTSImageScanParamPtr> __declspec(dllexport) COTSImageScanParamsList;
  81. }