OTSImageProcessParam.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. #pragma once
  2. #include "afx.h"
  3. #include "IntRange.h"
  4. #include "DoubleRange.h"
  5. #include "XMLSerialization.h"
  6. // COTSStageData command target
  7. namespace OTSIMGPROC
  8. {
  9. using namespace OTSDATA;
  10. __declspec(dllexport) const int DEFUALT_PARTICALE_AREA_MIN = 1;
  11. __declspec(dllexport) const int DEFUALT_PARTICALE_AREA_MAX = 200;
  12. __declspec(dllexport) const int DEFUALT_BG_GRAY_LEVEL_MIN = 150;
  13. __declspec(dllexport) const int DEFUALT_BG_GRAY_LEVEL_MAX = 255;
  14. __declspec(dllexport) const int DEFUALT_PARTICLE_GRAY_LEVEL_MIN = 5;
  15. __declspec(dllexport) const int DEFUALT_PARTICLE_GRAY_LEVEL_MAX = 155;
  16. class __declspec(dllexport) COTSImageProcessParam : public xmls::ISlo
  17. {
  18. public:
  19. COTSImageProcessParam(); // constructor
  20. COTSImageProcessParam(const COTSImageProcessParam&); // copy constructor
  21. COTSImageProcessParam(COTSImageProcessParam*); // copy constructor
  22. COTSImageProcessParam& operator=(const COTSImageProcessParam&); // =operator
  23. BOOL operator==(const COTSImageProcessParam&); // =operator
  24. virtual ~COTSImageProcessParam(); // detractor
  25. // serialization
  26. void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
  27. CDoubleRange GetIncArea() const { return m_oIncArea; }
  28. void SetIncArea(CDoubleRange a_oVal) { m_oIncArea = a_oVal; }
  29. CIntRange GetBGGray() const { return m_oBGGray; }
  30. void SetBGGray(CIntRange a_oVal) { m_oBGGray = a_oVal; }
  31. CIntRange GetParticleGray() const { return m_oParticleGray; }
  32. void SetParticleGray(CIntRange a_oVal) { m_oParticleGray = a_oVal; }
  33. OTS_BGREMOVE_TYPE GetBGRemoveType() const { return (OTS_BGREMOVE_TYPE)m_BGRemoveType; }
  34. void SetBGRemoveType(int a_oVal) { m_BGRemoveType = a_oVal; }
  35. OTS_AUTOBGREMOVE_TYPE GetAutoBGRemoveType() const { return(OTS_AUTOBGREMOVE_TYPE)m_autoBGRemoveType; }
  36. void SetAutoBGRemoveType(int a_oVal) { m_autoBGRemoveType = a_oVal; }
  37. void SetErrodDilateParam(int a_val) { m_errodDilateParam = a_val; }// 0 means don't use errosion and dilation.
  38. int GetErrodDilateParam() {return m_errodDilateParam ; }
  39. void SetOverlapParam(int a_val) { m_overlapParam = a_val; }// 0 means no overlap
  40. int GetOverlapParam() { return m_overlapParam; }
  41. void SetXrayStep(int val) { m_xrayStep = val; };
  42. int GetXrayStep() { return m_xrayStep; };
  43. protected:
  44. // cleanup
  45. void Cleanup();
  46. // initialization
  47. void Init();
  48. // duplication
  49. void Duplicate(const COTSImageProcessParam& a_oSource);
  50. private:
  51. CDoubleRange m_oIncArea; //셸憧膠충생
  52. CIntRange m_oBGGray; //교쒼뿍똑
  53. CIntRange m_oParticleGray; //셸憧膠뿍똑
  54. int m_BGRemoveType;
  55. int m_autoBGRemoveType;
  56. int m_errodDilateParam;
  57. int m_overlapParam;
  58. int m_xrayStep;
  59. };
  60. typedef std::shared_ptr<COTSImageProcessParam> __declspec(dllexport) COTSImageProcessParamPtr;
  61. typedef std::vector<COTSImageProcessParamPtr> __declspec(dllexport) COTSImageProcessParamsList;
  62. }