MechStitch.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. #pragma once
  2. // 下列 ifdef 块是创建使从 DLL 导出更简单的
  3. // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 MECHV2_EXPORTS
  4. // 符号编译的。在使用此 DLL 的
  5. // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
  6. // MECHSTITCH_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
  7. // 符号视为是被导出的。
  8. #ifndef MECHSTITCH_EXPORTS
  9. #ifdef _WIN64
  10. #ifdef _DEBUG
  11. #pragma comment(lib, "MechStitchX64D.lib")
  12. #else
  13. #pragma comment(lib, "MechStitchX64.lib")
  14. #endif
  15. #else
  16. #ifdef _DEBUG
  17. #pragma comment(lib, "MechStitchD.lib")
  18. #else
  19. #pragma comment(lib, "MechStitch.lib")
  20. #endif
  21. #endif
  22. #endif
  23. #ifdef MECHSTITCH_EXPORTS
  24. #define MECHSTITCH_API __declspec(dllexport)
  25. #else
  26. #define MECHSTITCH_API __declspec(dllimport)
  27. #endif
  28. #include "LogicDevice.h"
  29. #include "DIOSLogicDeviceStructure.h"
  30. static const char* DiosMechGridType = "GridType";
  31. typedef enum _Dios_Mech_GridType
  32. {
  33. Grid_No,
  34. Grid_1150,
  35. Universal,
  36. Grid_1800,
  37. Grid_1000,
  38. Grid_3000,
  39. Grid_1500
  40. }MECH_GRIDTYPE;
  41. static const char* DiosMechGridState = "GridState";
  42. typedef enum _Dios_Mech_GridState
  43. {
  44. Grid_Noinformation,
  45. Grid_IN,
  46. Grid_IN_CHANGE,
  47. Grid_OUT,
  48. Grid_OUT_CHANGE
  49. }MECH_GRIDSTATE;
  50. static const char* DiosMechGridOrientation = "GridOrientation";
  51. typedef enum _Dios_Mech_GridOrientation
  52. {
  53. Grid_Vertical,
  54. Grid_Horizontal
  55. }MECH_GRIDORIENTATION;
  56. const int UP_TO_DOWN = 1;//拼接方向 上->下
  57. const int DOWN_TO_UP = 2;// 下->上
  58. class MECHSTITCH_API MechStitch : public LogicDevice
  59. {
  60. public:
  61. MechStitch();
  62. ~MechStitch();
  63. ResDataObject* m_pSyncData;
  64. virtual bool SYSTEM_CALL GetDeviceType(GUID &DevType);
  65. //get device resource
  66. virtual RET_STATUS SYSTEM_CALL GetDeviceResource(ResDataObject PARAM_OUT *pDeviceResource);
  67. //register system status
  68. virtual RET_STATUS SYSTEM_CALL GetSEQResource(ResDataObject PARAM_OUT *pDeviceStatus);
  69. //ResourceCommand Request In and Response Out
  70. virtual RET_STATUS SYSTEM_CALL Request(ResDataObject PARAM_IN *pRequest, ResDataObject PARAM_OUT *pResponse);
  71. //notify to lower layer
  72. virtual RET_STATUS SYSTEM_CALL CmdToLogicDev(ResDataObject PARAM_IN *pCmd);
  73. virtual int DATA_ACTION SetAutoTracking(int nAutoTracking);
  74. virtual RET_STATUS SetStudyInfo(ResDataObject PARAM_IN& pParam);
  75. virtual RET_STATUS SetTechParamsInfo(ResDataObject PARAM_IN& pParam);
  76. virtual RET_STATUS SetViewList(int ViewCount,const char* viewID[],const char* viewName[]);
  77. virtual RET_STATUS SelectViewInfo(const char* viewID, const char* viewName);
  78. virtual RET_STATUS SetGridType(MECH_GRIDTYPE GridType);
  79. virtual RET_STATUS SetSID(float value);
  80. virtual RET_STATUS SetSOD(float value);
  81. virtual RET_STATUS SetupStitching(ResDataObject PARAM_IN& pParam);
  82. virtual RET_STATUS AcceptStitchingImage();
  83. //notice the URS that the last acquired image is rejected by host. Keep current position.
  84. virtual RET_STATUS RejectStitchingImage();
  85. //Cancel stitching procedure.
  86. virtual RET_STATUS CancelStitching();
  87. //Note the URS that stitching is finished.
  88. virtual RET_STATUS CompleteStitching();
  89. //New extra view, request the positioner to move to a position to take an extra image.
  90. virtual RET_STATUS NewExtraView();
  91. virtual RET_STATUS RepeatStitching();
  92. RET_STATUS UpdateSID(float value);
  93. RET_STATUS UpdateSOD(float value);
  94. RET_STATUS UpdateGridType(MECH_GRIDTYPE value);
  95. RET_STATUS UpdateGridState(MECH_GRIDSTATE value);
  96. RET_STATUS UpdateGridOrientation(MECH_GRIDORIENTATION value);
  97. RET_STATUS UpdateViewID(int value);
  98. RET_STATUS UpdatePatientSize(int value);
  99. RET_STATUS UpdateCurrentImage(int value);
  100. RET_STATUS UpdateImageCount(int value);
  101. RET_STATUS UpdateStitchDirection(int nDriction);
  102. RET_STATUS UpdateMachineryReady(int state);
  103. virtual RET_STATUS DATA_ACTION GetTomoResults(ResDataObject &resultAngle, ResDataObject &resultHeight);
  104. };