CareRayInterface.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. #include "include/Structures.h"
  2. #ifdef __cplusplus
  3. extern "C" {
  4. #endif
  5. #ifdef _CRAPI_
  6. #define CRAPI_PORT __declspec(dllexport)
  7. #else
  8. #define CRAPI_PORT __declspec(dllimport)
  9. #endif
  10. ////////////////////////////////////////////////////////////////////////////////////////
  11. /** connect detector */
  12. typedef CRAPI_PORT int (*CB_CR_connect_detector)(char*);
  13. /** disconnect detector */
  14. typedef CRAPI_PORT int (*CB_CR_disconnect_detector)();
  15. /** reset the detector */
  16. typedef CRAPI_PORT int (*CB_CR_reset_detector)(int);
  17. /** set the check mode for system **/
  18. typedef CRAPI_PORT int (*CB_CR_set_check_mode)(int);
  19. /** set the sync mode for system **/
  20. typedef CRAPI_PORT int (*CB_CR_set_sync_mode)(int);
  21. /** set the device cycle time */
  22. typedef CRAPI_PORT int (*CB_CR_set_cycle_time)(int, int, int);
  23. /** set the device into the normal power mode **/
  24. typedef CRAPI_PORT int (*CB_CR_set_normal_power)(void);
  25. /** set the device into the save-power mode **/
  26. typedef CRAPI_PORT int (*CB_CR_set_save_power)(void);
  27. /** permit exposure */
  28. typedef CRAPI_PORT int (*CB_CR_permit_exposure)();
  29. /** start grab frame */
  30. typedef CRAPI_PORT int (*CB_CR_start_acq_full_image)();
  31. typedef CRAPI_PORT int (*CB_CR_start_acq_dark_full_image)();
  32. typedef CRAPI_PORT int (*CB_CR_start_acq_prev_image)();
  33. typedef CRAPI_PORT int (*CB_CR_start_acq_dark_prev)();
  34. typedef CRAPI_PORT int (*CB_CR_start_acq_def_image)();
  35. typedef CRAPI_PORT int (*CB_CR_start_acq_fluoro_image)(void*, int);
  36. typedef CRAPI_PORT int (*CB_CR_start_acq_fluoro_dark_image)(void*, int);
  37. /** stop grab frame */
  38. typedef CRAPI_PORT int (*CB_CR_stop_acq_frame)();
  39. typedef CRAPI_PORT int (*CB_CR_stop_acq_frame_cleanup)();
  40. /** set the correction option in client **/
  41. typedef CRAPI_PORT int (*CB_CR_set_user_correction)(UserCorrection*);
  42. /** get the correction option in client **/
  43. typedef CRAPI_PORT int (*CB_CR_get_user_correction)(UserCorrection*);
  44. /** set the exposure dose */
  45. typedef CRAPI_PORT int (*CB_CR_set_dose)(int);
  46. //get current active detector's id which used for dual detectors system
  47. //out of date
  48. typedef CRAPI_PORT int (*CB_CR_get_active_detector_ID)();
  49. typedef CRAPI_PORT int (*CB_CR_set_active_detector)(int);
  50. typedef CRAPI_PORT int (*CB_CR_get_dual_detector_state)(DetectorActiveState*);
  51. //smart hand switch
  52. typedef CRAPI_PORT int (*CB_CR_set_smart_hand_switch)(SHSParam*);
  53. typedef CRAPI_PORT int (*CB_CR_get_SHS_status)(SHSStatus*);
  54. typedef CRAPI_PORT int (*CB_CR_get_wireless_ip)(char*);
  55. typedef CRAPI_PORT int (*CB_CR_set_wireless_ip)(char*);
  56. typedef CRAPI_PORT int (*CB_CR_get_station_mode_conf)(WirelessStationConf*);
  57. typedef CRAPI_PORT int (*CB_CR_set_station_mode_conf)(WirelessStationConf*);
  58. typedef CRAPI_PORT int (*CB_CR_get_temperature_cal_data)(TrainHead*, int*);
  59. typedef CRAPI_PORT int (*CB_CR_check_temperature_slot)(int nExpTime, float fTemperature);
  60. ////////////////////////////////////////////////////////////////////////////////////////
  61. /** read the Careray API version **/
  62. typedef CRAPI_PORT int (*CB_CR_get_API_Version)(char*);
  63. /** check the socket connection state **/
  64. typedef CRAPI_PORT int (*CB_CR_get_conn_state)();
  65. /** read detector type **/
  66. typedef CRAPI_PORT int (*CB_CR_get_detector_type)();
  67. /** get detector information */
  68. typedef CRAPI_PORT int (*CB_CR_get_detector_info)(DetectorInfo*);
  69. /** get mode information */
  70. typedef CRAPI_PORT int (*CB_CR_get_mode_info)(int, ModeInfo*);
  71. /** get status information */
  72. typedef CRAPI_PORT int (*CB_CR_get_status_info)(StatusInfo*);
  73. /** get specified detector's status information */
  74. typedef CRAPI_PORT int (*CB_CR_get_status_info_Ex)(StatusInfo*, int);
  75. /** get the object frame attribution **/
  76. typedef CRAPI_PORT int (*CB_CR_get_image_attr)(FrameAttr*);
  77. /** get one image **/
  78. typedef CRAPI_PORT int (*CB_CR_get_image)(int,BOOL,void*);
  79. /** get preview image **/
  80. typedef CRAPI_PORT int (*CB_CR_get_preview_image)(int, BOOL, void*);
  81. typedef CRAPI_PORT int (*CB_CR_get_unuploaded_img_info)(UnuploadedImgInfo*);
  82. /** query the information of the exposure progress for device**/
  83. typedef CRAPI_PORT int (*CB_CR_query_prog_info)(int,ExpProgress*);
  84. typedef CRAPI_PORT int (*CB_CR_inpaint_bad_pixels)(WORD*); //ÐÞ¸´»µÏñËØ
  85. //////////////////////////////////////////////////////////////////////////
  86. /** CareRay calibration */
  87. // typedef CRAPI_PORT int (*CB_CR_set_user_cal_dir(char*);
  88. //
  89. // typedef CRAPI_PORT int (*CB_CR_load_user_cal_imgs(char*);
  90. //Load user specified calibration files used for correction
  91. typedef CRAPI_PORT int (*CB_CR_select_cal_type)(char*);
  92. //////////////////////////////////////////////////////////////////////////
  93. /** CareRay calibration */
  94. typedef CRAPI_PORT int (*CB_CR_get_cal_params)(CalParams*);
  95. typedef CRAPI_PORT int (*CB_CR_set_offset_correction)(BOOL ofst_corr);
  96. typedef CRAPI_PORT int (*CB_CR_cal_offset)(int);
  97. typedef CRAPI_PORT int (*CB_CR_linear_calibration)(void);
  98. typedef CRAPI_PORT int (*CB_CR_portable_calibration)(void);
  99. typedef CRAPI_PORT int (*CB_CR_execute_linear_cal)();
  100. typedef CRAPI_PORT int (*CB_CR_execute_portable_cal)();
  101. typedef CRAPI_PORT int (*CB_CR_stop_cal_procedure)(BOOL);
  102. typedef CRAPI_PORT int (*CB_CR_start_fluoro_calibration)(int);
  103. typedef CRAPI_PORT int (*CB_CR_query_calibration_status)(CalibrationInfo*);
  104. typedef CRAPI_PORT int (*CB_CR_do_gridpattern_filtration)(WORD*, int, int, int);
  105. //////////////////////////////////////////////////////////////////////////
  106. //soft sync API
  107. typedef CRAPI_PORT int (*CB_CR_register_callback)(eventCallback);
  108. typedef CRAPI_PORT int (*CB_CR_send_exp_request)(void);
  109. typedef CRAPI_PORT int (*CB_CR_ready_state_request)(void);
  110. typedef CRAPI_PORT int (*CB_CR_start_soft_acquisition)(void);
  111. //AEC acquire API
  112. typedef CRAPI_PORT int (*CB_CR_set_AEC_integ_time)(int prevIntegTime,int radIntegTime);
  113. typedef CRAPI_PORT int (*CB_CR_register_AEC_callback)(eventCallback);
  114. typedef CRAPI_PORT int (*CB_CR_start_AEC_acquire_process)();
  115. //One Key Calibration API
  116. typedef CRAPI_PORT int (*CB_CR_get_one_key_cal)();
  117. typedef CRAPI_PORT int (*CB_CR_check_img_for_factory_cal)(WORD* radImg);
  118. typedef CRAPI_PORT int (*CB_CR_download_factory_cal_files)();
  119. typedef CRAPI_PORT int (*CB_CR_execute_one_key_cal)(WORD *imgData, WORD *darkImgData, SurfaceFitResult* fitResult);
  120. //API for long integration time mode(NDT mode)
  121. typedef CRAPI_PORT int (*CB_CR_start_acq_NDT_dark_image)(int);
  122. typedef CRAPI_PORT int (*CB_CR_execute_NDT_CAL)(UINT*, UINT*, int);
  123. typedef CRAPI_PORT int (*CB_CR_correct_NDT_image)(UINT*, UINT*, int);
  124. typedef CRAPI_PORT int (*CB_CR_set_NDT_frame_num)(int);
  125. typedef CRAPI_PORT int (*CB_CR_finish_NDT_acquisition)();
  126. typedef CRAPI_PORT int (*CB_CR_check_NDT_CAL_Files)();
  127. #ifdef __cplusplus
  128. }
  129. #endif