OTSImageScanParam.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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::FROM_CENTER;
  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_FIVE_TIES_OPTIONS DEFAULE_IMAGE_SIZE = OTS_FIVE_TIES_OPTIONS::TIE3;
  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_FIVE_TIES_OPTIONS GetImagePixelSize() { return m_nImagePixelSize; }
  47. void SetImagePixelSize(OTS_FIVE_TIES_OPTIONS a_nImagePixelSize) { m_nImagePixelSize = 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. protected:
  52. // cleanup
  53. void Cleanup();
  54. // initialization
  55. void Init();
  56. // duplication
  57. void Duplicate(const COTSImageScanParam& a_oSource);
  58. private:
  59. OTS_MEASURE_STOP_MODE m_nStopMode; //测量终止方式
  60. //BOOL m_bShowStopMode;
  61. int m_nStopParamMeasTime; //测量时间
  62. //BOOL m_bShowMeasTime;
  63. int m_nStopParamFields; //帧图数
  64. //BOOL m_bShowParamFields;
  65. int m_nStopParamParticles; //夹杂物数
  66. //BOOL m_bShowParticles;
  67. OTS_GET_IMAGE_MODE m_nSatrtImageMode; //取图方式
  68. //BOOL m_bShowStartImageMode;
  69. OTS_THREE_TIES_OPTIONS m_nScanImageSpeed; //扫描图精度
  70. //BOOL m_bShowImageSpeed;
  71. OTS_FIVE_TIES_OPTIONS m_nImagePixelSize; //扫描图尺寸
  72. //BOOL m_bShowPixelSize;
  73. };
  74. typedef std::shared_ptr<COTSImageScanParam> __declspec(dllexport) COTSImageScanParamPtr;
  75. typedef std::vector<COTSImageScanParamPtr> __declspec(dllexport) COTSImageScanParamsList;
  76. }