DIOS.Dev.MECH.Mould.hpp 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. #pragma once
  2. #include <string>
  3. #include "DIOS.Dev.IODevice.hpp"
  4. #include "DIOS.Dev.IODevice.Detail.hpp"
  5. #include "MECH.BasicMoulds.hpp"
  6. #include "DriverConfigInfo.tlh"
  7. #include "DriverConfigInfo.tli"
  8. #include "DIOSDICOMInfo.h"
  9. namespace nsDetail = DIOS::Dev::Detail;
  10. #ifndef DIOSDEVMECHDEVICEMOULD_EXPORTS
  11. #ifdef _WIN64
  12. #ifdef _DEBUG
  13. #pragma comment(lib, "DIOS.Dev.MECH.Mould64D.lib")
  14. #else
  15. #pragma comment(lib, "DIOS.Dev.MECH.Mould64.lib")
  16. #endif
  17. #else
  18. #ifdef _DEBUG
  19. #pragma comment(lib, "DIOS.Dev.MECH.MouldD.lib")
  20. #else
  21. #pragma comment(lib, "DIOS.Dev.MECH.MouldD.lib")
  22. #endif
  23. #endif
  24. #endif
  25. #ifdef DIOSDEVMECHDEVICEMOULD_EXPORTS
  26. #define _DIOSDEVMECHDEVICEMOULD_API __declspec(dllexport)
  27. #else
  28. #define _DIOSDEVMECHDEVICEMOULD_API __declspec(dllimport)
  29. #endif
  30. #pragma warning (disable:4251) // warning C4251: class “DIOS::Dev::Detail::Generator::DoseUnit”需要有 dll 接口由 class“DIOS::Dev::Detail::Generator::MECHMould”的客户端使用
  31. namespace DIOS::Dev::Detail::MECH
  32. {
  33. //-----------------------------------------------------------------------------
  34. // MECHUnit
  35. //-----------------------------------------------------------------------------
  36. class _DIOSDEVMECHDEVICEMOULD_API MECHUnit : public IOLogicUnit
  37. {
  38. public:
  39. MECHUnit() {};
  40. virtual ~MECHUnit() {};
  41. public:
  42. std::unique_ptr<PATIENTSIZEMould> m_PatientSize;
  43. std::unique_ptr<VIEWIDMould> m_ViewID;
  44. std::unique_ptr <POSITIONNUMBERMould> m_PostionNumber;
  45. std::unique_ptr<GRIDSTATEMould> m_GridState;
  46. std::unique_ptr<GRIDTYPEMould> m_GridType;
  47. std::unique_ptr<GRIDORIENTATIONMould> m_GridOrientation;
  48. std::unique_ptr<TIDMould> m_TID;
  49. std::unique_ptr<SIDMould> m_SID;
  50. std::unique_ptr<SODMould> m_SOD;
  51. std::unique_ptr<ENTRANCEMould> m_ENTRANCE;
  52. };
  53. //-----------------------------------------------------------------------------
  54. // MAMMOMECHUnit
  55. //-----------------------------------------------------------------------------
  56. class _DIOSDEVMECHDEVICEMOULD_API MAMMOMECHUnit : public IOLogicUnit
  57. {
  58. public:
  59. MAMMOMECHUnit() {};
  60. virtual ~MAMMOMECHUnit() {};
  61. public:
  62. std::unique_ptr<MAMMOGRIDMould> m_Mammo_Grid;
  63. std::unique_ptr<MAMMOAEMould> m_Mammo_AE;
  64. std::unique_ptr<MAMMOTHICKNESSMould> m_Mammo_Thickness;
  65. std::unique_ptr <MAMMOTUBEFILTERMould> m_Mammo_FT;
  66. std::unique_ptr<MAMMOPRESSDECMould> m_Mammo_CompPressureDEC;
  67. std::unique_ptr<MAMMODEPRESSMould> m_Mammo_Depress;
  68. std::unique_ptr<MAMMOANGLEMould> m_Mammo_MechAngle;
  69. std::unique_ptr<MAMMOHEIGHTMould> m_Mammo_MechHeight;
  70. std::unique_ptr<MAMMOPRESSVALMould> m_Mammo_PressureValue;
  71. std::unique_ptr<MAMMOAGDMould> m_Mammo_AGD;
  72. std::unique_ptr<MAMMOMAGMould> m_Mammo_MAG;
  73. };
  74. //-----------------------------------------------------------------------------
  75. // MECHMould
  76. //-----------------------------------------------------------------------------
  77. namespace nDev = DIOS::Dev;
  78. class _DIOSDEVMECHDEVICEMOULD_API MECHMould
  79. {
  80. public:
  81. MECHMould ();
  82. ~MECHMould ();
  83. protected:
  84. virtual void RegisterExamInfo(Dispatch* Dispatch);
  85. virtual void RegisterPostionNumber(Dispatch* Dispatch);
  86. virtual void RegisterGridControl(Dispatch* Dispatch);
  87. virtual void RegisterMotionControl(Dispatch* Dispatch);
  88. virtual void RegisterTOMOControl(Dispatch* Dispatch);
  89. virtual void RegisterMammoInfo(Dispatch* Dispatch);
  90. private:
  91. //caoxue
  92. nDev::RET_STATUS JSSetStudyInfo(std::string in, std::string& out);
  93. nDev::RET_STATUS JSSetViewList(std::string in, std::string& out);
  94. nDev::RET_STATUS JSSelectViewInfo(std::string in, std::string& out);
  95. nDev::RET_STATUS JSSetTechParamsInfo(std::string in, std::string& out);
  96. nDev::RET_STATUS JSSetPositonNumber(std::string in, std::string& out);
  97. nDev::RET_STATUS JSSetGridType(std::string in, std::string& out);
  98. nDev::RET_STATUS JSSetAutoTracking(std::string in, std::string& out);
  99. nDev::RET_STATUS JSSetSID(std::string in, std::string& out);
  100. nDev::RET_STATUS JSSetSOD(std::string in, std::string& out);
  101. nDev::RET_STATUS JSGetTomoResults(std::string in, std::string& out);
  102. protected:
  103. virtual nDev::RET_STATUS SetStudyInfo(STUDAY_INFO info)=0;
  104. virtual nDev::RET_STATUS SetViewList(int ViewCount, const char* viewID[], const char* viewName[]) = 0;
  105. virtual nDev::RET_STATUS SelectViewInfo(const char* viewID, const char* viewName) = 0;
  106. virtual nDev::RET_STATUS SetAutoTracking(int nAutoTracking) = 0;
  107. virtual nDev::RET_STATUS SetGridType(AttrKey::MECH_GRIDTYPE GridType) = 0;
  108. virtual nDev::RET_STATUS SetSID(float value) = 0;
  109. virtual nDev::RET_STATUS SetSOD(float value) = 0;
  110. virtual nDev::RET_STATUS SetPositonNumber(int pn) = 0;
  111. virtual nDev::RET_STATUS GetTomoResults(std::string& result) = 0;
  112. protected:
  113. MECHUnit m_MECHUnit;
  114. MAMMOMECHUnit m_MAMMOMECHUnit;
  115. };
  116. }
  117. namespace DIOS::Dev::Detail::MECH
  118. {
  119. class _DIOSDEVMECHDEVICEMOULD_API DriverMould : public DIOS::Dev::IODriver
  120. {
  121. public:
  122. DriverMould ();
  123. ~DriverMould ();
  124. virtual std::string GetGUID () const;
  125. protected:
  126. std::list <ConfigInfo> m_ConfigInfo;
  127. };
  128. }