123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- #pragma once
- #include "otsdataconst.h"
- #include "XMLSerialization.h"
- namespace OTSIMGPROC
- {
- using namespace OTSDATA;
- // stop mode
- __declspec(dllexport) const OTS_MEASURE_STOP_MODE DEFUALT_MEASURE_STOP_MODE = OTS_MEASURE_STOP_MODE::CoverMode;
- // stop parameters
- __declspec(dllexport) const int DEFUALT_PARAM_FIELD = 500;
- __declspec(dllexport) const int DEFUALT_PARAM_TIME = 300;
- __declspec(dllexport) const int DEFUALT_PARAM_PARTICLE = 5000;
- // image mode
- __declspec(dllexport) const OTS_GET_IMAGE_MODE DEFAULT_IMAGEMODE = OTS_GET_IMAGE_MODE::SpiralSequnce;
- // scan speed
- __declspec(dllexport) const OTS_THREE_TIES_OPTIONS DEFAULE_SCAN_SPEED = OTS_THREE_TIES_OPTIONS::TIE2;
- // image size
- __declspec(dllexport) const OTS_ImageResolution_OPTIONS DEFAULE_IMAGE_SIZE = OTS_ImageResolution_OPTIONS::_1024_768;
- class __declspec(dllexport) COTSImageScanParam : public xmls::ISlo
- {
-
- public:
- COTSImageScanParam(); // constructor
- COTSImageScanParam(const COTSImageScanParam&); // copy constructor
- COTSImageScanParam(COTSImageScanParam*); // copy constructor
- COTSImageScanParam& operator=(const COTSImageScanParam&); // =operator
- BOOL operator==(const COTSImageScanParam&); // =operator
- virtual ~COTSImageScanParam(); // detractor
- // serialization
-
- void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
- //测量终止方式
- OTS_MEASURE_STOP_MODE GetStopMode() { return m_nStopMode;}
- void SetStopMode(OTS_MEASURE_STOP_MODE a_nStopMode) { m_nStopMode = a_nStopMode; }
-
-
- //测量时间
- int GetStopParamMeasTime() { return m_nStopParamMeasTime; }
- void SetStopParamMeasTime(int a_nStopParamMeasTime) { m_nStopParamMeasTime = a_nStopParamMeasTime; }
- //帧图数
- int GetStopParamFields() { return m_nStopParamFields; }
- void SetStopParamFields(int a_nStopParamFields) { m_nStopParamFields = a_nStopParamFields; }
-
- //夹杂物数
- int GetStopParamParticles() { return m_nStopParamParticles; }
- void SetStopParamParticles(int a_nStopParamParticles) { m_nStopParamParticles = a_nStopParamParticles; }
- //取图方式
- OTS_GET_IMAGE_MODE GetStartImageMode() { return m_nSatrtImageMode; }
- void SetStartImageMode(OTS_GET_IMAGE_MODE a_nSatrtImageMode) { m_nSatrtImageMode = a_nSatrtImageMode; }
- //扫描图尺寸
- OTS_ImageResolution_OPTIONS GetImageResolutionEnumNo() { return m_nImageResolution; }
- void SetImagePixelSize(OTS_ImageResolution_OPTIONS a_nImagePixelSize) { m_nImageResolution = a_nImagePixelSize; }
- //扫描图精度
- OTS_THREE_TIES_OPTIONS GetScanImageSpeed() { return m_nScanImageSpeed; }
- void SetScanImageSpeed(OTS_THREE_TIES_OPTIONS a_nScanImageSpeed) { m_nScanImageSpeed = a_nScanImageSpeed; }
-
- CSize GetImageResolution() {
- return CSize(m_ImageResolutionWidth, m_ImageResolutionHeight);
- }
- protected:
- // cleanup
- void Cleanup();
- // initialization
- void Init();
- // duplication
- void Duplicate(const COTSImageScanParam& a_oSource);
- private:
- OTS_MEASURE_STOP_MODE m_nStopMode; //测量终止方式
- //BOOL m_bShowStopMode;
- int m_nStopParamMeasTime; //测量时间
- //BOOL m_bShowMeasTime;
- int m_nStopParamFields; //帧图数
- //BOOL m_bShowParamFields;
- int m_nStopParamParticles; //夹杂物数
- //BOOL m_bShowParticles;
- OTS_GET_IMAGE_MODE m_nSatrtImageMode; //取图方式
- //BOOL m_bShowStartImageMode;
- OTS_THREE_TIES_OPTIONS m_nScanImageSpeed; //扫描图精度
- //BOOL m_bShowImageSpeed;
- OTS_ImageResolution_OPTIONS m_nImageResolution; //扫描图尺寸
- int m_ImageResolutionWidth;
- int m_ImageResolutionHeight;
- //BOOL m_bShowPixelSize;
- };
- typedef std::shared_ptr<COTSImageScanParam> __declspec(dllexport) COTSImageScanParamPtr;
- typedef std::vector<COTSImageScanParamPtr> __declspec(dllexport) COTSImageScanParamsList;
- }
|