OTSParticleClr.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. #pragma once
  2. #include "OTSParticle.h"
  3. #include "OTSFeatureClr.h"
  4. namespace OTSINTERFACE {
  5. using namespace System;
  6. using namespace System::Drawing;
  7. using namespace OTSDATA;
  8. public ref class COTSParticleClr : public Object
  9. {
  10. public:
  11. // constructor
  12. COTSParticleClr(); // constructor
  13. COTSParticleClr(COTSParticlePtr); // copy constructor
  14. COTSParticleClr(COTSParticle*);
  15. ~COTSParticleClr();
  16. !COTSParticleClr();
  17. COTSParticlePtr GetOTSParticlePtr();
  18. // rectangle
  19. System::Drawing::Rectangle^ GetParticleRect();
  20. void SetParticleRect(System::Drawing::Rectangle^ a_rectParticle);
  21. //Type
  22. int GetType();
  23. void SetType(int a_nType);
  24. //area
  25. double GetArea();
  26. void SetArea(double a_dArea);
  27. // gray
  28. BYTE GetAveGray();
  29. void SetAveGray(BYTE a_cAveGray);
  30. // x-ray position
  31. System::Drawing::Point^ GetXRayPos();
  32. void SetXRayPos(System::Drawing::Point^ a_pXRayPos);
  33. // feature
  34. COTSFeatureClr^ GetFeature();
  35. void SetFeature(COTSFeatureClr^ a_pFeautre);
  36. // tag id
  37. int GetTagId();
  38. void SetTagId(int a_nTagId);
  39. // search id
  40. int GetSearchId();
  41. void SetSearchId(int a_nSearchId);
  42. // analysis id
  43. int GetAnalysisId();
  44. void SetAnalysisId(int a_nAnalysisId);
  45. // field id
  46. int GetFieldId();
  47. void SetFieldId(int a_nFieldId);
  48. double GetDMAX()
  49. {
  50. return m_Particle->get()->GetDMax();
  51. }
  52. double GetDMIN()
  53. {
  54. return m_Particle->get()->GetDMin();
  55. }
  56. double GetDMPERP()
  57. {
  58. return m_Particle->get()->GetDPerp();
  59. }
  60. double GetDINSCR()
  61. {
  62. return m_Particle->get()->GetDInscr ();
  63. }
  64. double GetDMEAN()
  65. {
  66. return m_Particle->get()->GetDMean();
  67. }
  68. double GetDELONG()
  69. {
  70. return m_Particle->get()->GetDElong();
  71. }
  72. double GetDPRIMETER()
  73. {
  74. return m_Particle->get()->GetPerimeter();
  75. }
  76. double GetORIENTATION()
  77. {
  78. return m_Particle->get()->GetOrientation();
  79. }
  80. double GetEqualCircleDiameter()
  81. {
  82. return m_Particle->get()->GetEqualCircleDiameter();
  83. }
  84. String^ GetTypeName()
  85. {
  86. return gcnew String(m_Particle->get()->TypeName().c_str());
  87. }
  88. String^ GetTypeColor()
  89. {
  90. return gcnew String(m_Particle->get()->TypeColor().c_str());
  91. }
  92. protected:
  93. COTSParticlePtr* m_Particle;
  94. };
  95. typedef System::Collections::Generic::List<COTSParticleClr^> COTSParticleListClr;
  96. }