DIOS.Dev.MECH.Mould.hpp 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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. _DIOSDEVMECHDEVICEMOULD_API string GetProcessDirectory();
  35. //获取配置文件中指定模块的版本号
  36. _DIOSDEVMECHDEVICEMOULD_API bool GetVersion(string& version, HMODULE hMyModule);
  37. _DIOSDEVMECHDEVICEMOULD_API bool GetVersion(string& version, ResDataObject& config);
  38. _DIOSDEVMECHDEVICEMOULD_API bool GetVersion(string& version);
  39. _DIOSDEVMECHDEVICEMOULD_API void TransJsonText(ResDataObject& config);
  40. //-----------------------------------------------------------------------------
  41. // MECHUnit
  42. //-----------------------------------------------------------------------------
  43. class _DIOSDEVMECHDEVICEMOULD_API MECHUnit : public IOLogicUnit
  44. {
  45. public:
  46. MECHUnit() {};
  47. virtual ~MECHUnit() {};
  48. public:
  49. //检查
  50. std::unique_ptr<PATIENTSIZEMould> m_PatientSize;
  51. std::unique_ptr<VIEWIDMould> m_ViewID;
  52. //Mechanical
  53. std::unique_ptr<MechStateMould> m_MechState;
  54. std::unique_ptr <POSITIONNUMBERMould> m_PostionNumber;
  55. std::unique_ptr<TubeAngleMould> m_TubeAngle;
  56. std::unique_ptr<TubeHeightMould> m_TubeHeight;
  57. std::unique_ptr<TIDMould> m_TID;
  58. std::unique_ptr<SIDMould> m_SID;
  59. std::unique_ptr<SEDMould> m_SED;
  60. std::unique_ptr<SODMould> m_SOD;
  61. std::unique_ptr<FIDMould> m_FID;
  62. std::unique_ptr<GRIDMould> m_GridState;//Grid
  63. string m_strInfo;//机架详细信息
  64. //遮光器
  65. std::unique_ptr<FILTERMould> m_Filter;
  66. //乳腺
  67. //std::unique_ptr<GRIDMould> m_Mammo_Grid;
  68. std::unique_ptr<MAMMOAEMould> m_Mammo_AE;
  69. std::unique_ptr<MAMMOTHICKNESSMould> m_Mammo_Thickness;
  70. //std::unique_ptr<FILTERMould> m_Mammo_FT;
  71. //std::unique_ptr<SIDMould> m_Mammo_SID;
  72. std::unique_ptr<MAMMOPRESSDECMould> m_Mammo_CompPressureDEC;
  73. std::unique_ptr<MAMMODEPRESSMould> m_Mammo_Depress;
  74. std::unique_ptr<MAMMOPRESSVALMould> m_Mammo_PressureValue;
  75. std::unique_ptr<MAMMOAGDMould> m_Mammo_AGD;
  76. std::unique_ptr<MAMMOMAGMould> m_Mammo_MAG;
  77. //TOMO
  78. //std::unique_ptr<MAMMOMAGMould> m_Tomo_TID;
  79. //std::unique_ptr<MAMMOMAGMould> m_Tomo_SID;
  80. std::unique_ptr<TOMOTypeMould> m_Tomo_Type;
  81. std::unique_ptr<TOMOScanDirectionMould> m_Tomo_ScanDirection;
  82. std::unique_ptr<TOMOFrameCountMould> m_Tomo_FrameCount;
  83. std::unique_ptr<TOMOFrameRateMould> m_Tomo_FrameRate;
  84. std::unique_ptr<TOMOScanAngleMould> m_Tomo_ScanAngle;
  85. std::unique_ptr<TOMOScanImageNumberMould> m_Tomo_ScanImageNumber;
  86. //拼接
  87. std::unique_ptr<StitchingStateMould> m_StitchingState;
  88. std::unique_ptr<StitchHeightMould> m_StitchHeight;
  89. std::unique_ptr<StitchLengthMould> m_StitchLength;
  90. std::unique_ptr<StitchOverLapMould> m_StitchOverLap;
  91. std::unique_ptr<StitchPIDMould> m_StitchPID;
  92. std::unique_ptr<StitchDirectionMould> m_StitchDirection;
  93. std::unique_ptr<StitchTypeMould> m_StitchType;
  94. std::unique_ptr<StitchStepLengthMould> m_StitchStepLength;
  95. std::unique_ptr<FPDPositionMould> m_FPDPosition;
  96. std::unique_ptr<TotalImageCountMould> m_TotalImageCount;
  97. std::unique_ptr<CurrentImageNumberMould> m_CurrentImageNumber;
  98. //牛头
  99. std::unique_ptr<KVMould> m_KV;
  100. std::unique_ptr<MAMould> m_MA;
  101. std::unique_ptr<MSMould> m_MS;
  102. std::unique_ptr<MASMould> m_MAS;
  103. std::unique_ptr<TECHMODEMould> m_Techmode;
  104. std::unique_ptr<FOCUSMould> m_Focus;
  105. std::unique_ptr<WORKSTATIONMould> m_WS;
  106. std::unique_ptr<AECDENSITYMould> m_AECDensity;
  107. std::unique_ptr<AECFIELDMould> m_AECField;
  108. };
  109. //-----------------------------------------------------------------------------
  110. // MECHMould
  111. //-----------------------------------------------------------------------------
  112. namespace nDev = DIOS::Dev;
  113. class _DIOSDEVMECHDEVICEMOULD_API MECHMould
  114. {
  115. public:
  116. MECHMould ();
  117. ~MECHMould ();
  118. protected:
  119. virtual void RegisterExamInfo(Dispatch* Dispatch);
  120. virtual void RegisterNormalControl(Dispatch* Dispatch);
  121. virtual void RegisterMammoControl(Dispatch* Dispatch);
  122. virtual void RegisterTOMOControl(Dispatch* Dispatch);
  123. virtual void RegisterCollimatorControl(Dispatch* Dispatch);
  124. virtual void RegisterStitchingControl(Dispatch* Dispatch);
  125. virtual void RegisterExtraScreenControl(Dispatch* Dispatch);
  126. protected:
  127. //检查信息接口
  128. virtual RET_STATUS SetStudyInfo(ResDataObject& pParam);
  129. virtual RET_STATUS SetViewInfo(ResDataObject& pParam);
  130. virtual RET_STATUS SetPatientInfo(ResDataObject& pParam);
  131. //机架通用接口
  132. virtual RET_STATUS Reset() { return RET_STATUS::RET_SUCCEED; };
  133. virtual RET_STATUS SetTechParamsInfo(ResDataObject& pParam);
  134. virtual RET_STATUS SetPositionNumber(int pn);
  135. virtual RET_STATUS SetSID(float value);
  136. virtual RET_STATUS SetSOD(float value);
  137. virtual RET_STATUS MoveToHome(string& value);
  138. virtual RET_STATUS MoveMech(string& value);
  139. virtual RET_STATUS StopMech(string& value);
  140. virtual RET_STATUS SetGrid(AttrKey::MECH_GRIDSTATE GridState);
  141. virtual RET_STATUS SetAutoTracking(int nAutoTracking);
  142. virtual RET_STATUS ActiveSyncMode(_tSyncModeArgs value) { return RET_STATUS::RET_SUCCEED; };
  143. //乳腺接口
  144. virtual RET_STATUS SetCollimatorSize(int xsize, int ysize);
  145. virtual RET_STATUS SetCollimatorSID(int sid);
  146. virtual RET_STATUS SetCollimatorFilter(int pParams);
  147. virtual RET_STATUS SetCollimatorAngle(int pParams);
  148. virtual RET_STATUS SetCollimatorLight(int pParams);
  149. //TOMO
  150. virtual RET_STATUS SetTomoEnable(bool state);
  151. virtual RET_STATUS SetTomoExpMode(string& vakue);
  152. virtual RET_STATUS SetTomoTechnical(string& value);
  153. virtual RET_STATUS GetTomoResults(string& result);
  154. //遮光器
  155. virtual RET_STATUS SetCollimator(ECOM_COLLIMATOR_INFO &curCollimator);
  156. virtual RET_STATUS SetFilter(int nFilter);
  157. //拼接相应接口
  158. virtual RET_STATUS BeginStitching();
  159. virtual RET_STATUS InitStitching();
  160. virtual RET_STATUS EndStitching();
  161. virtual RET_STATUS SetupStitching(string& value);
  162. virtual RET_STATUS AcceptStitchingImage();
  163. virtual RET_STATUS RejectStitchingImage();
  164. virtual RET_STATUS CancelStitching();
  165. virtual RET_STATUS CompleteStitching();
  166. virtual RET_STATUS NewExtraView();
  167. virtual RET_STATUS RepeatStitching();
  168. virtual RET_STATUS SetAutoPosiitonNo(int nPN);
  169. //牛头
  170. virtual RET_STATUS SetExpEnable(bool nExpEnabled);
  171. virtual RET_STATUS SetWS(int nWS);
  172. virtual RET_STATUS SetKV(int nKV);
  173. virtual RET_STATUS SetMA(float fMA);
  174. virtual RET_STATUS SetMS(float fMS);
  175. virtual RET_STATUS SetMAS(float fMAS);
  176. virtual RET_STATUS SetFO(int nFO);
  177. virtual RET_STATUS SetTechMode(int nET);
  178. virtual RET_STATUS SetAECField(int nAECFieldSel);
  179. virtual RET_STATUS SetDensity(float nAECDensity);
  180. virtual RET_STATUS SetBodySize(string strSize);
  181. public:
  182. MECHUnit m_MECHUnit;
  183. };
  184. }
  185. namespace DIOS::Dev::Detail::MECH
  186. {
  187. class _DIOSDEVMECHDEVICEMOULD_API DriverMould : public DIOS::Dev::IODriver
  188. {
  189. public:
  190. DriverMould ();
  191. ~DriverMould ();
  192. virtual std::string GetGUID () const;
  193. virtual string GetConnectDLL(string& ConfigFileName);
  194. virtual ResDataObject GetConnectParam(string& ConfigFileName);
  195. protected:
  196. std::list <ConfigInfo> m_ConfigInfo;
  197. };
  198. }