CrapiDll.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. /** \file crapi_dll.h
  2. * \date 2014/07/27
  3. * \version 1.0
  4. * \author liujieqing
  5. * All Rights Reserved. Copyright(C) CARERAY LTD.2010,2014
  6. * \brief This file contains the declaration of functions for export and import
  7. */
  8. #ifndef __CRAPI_DLL_H__
  9. #define __CRAPI_DLL_H__
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. #ifdef _CRAPI_
  14. #define CRAPI_PORT __declspec(dllexport)
  15. #else
  16. #define CRAPI_PORT __declspec(dllimport)
  17. #endif
  18. ////////////////////////////////////////////////////////////////////////////////////////
  19. /** connect detector */
  20. CRAPI_PORT int CR_connect_detector(char*);
  21. /** disconnect detector */
  22. CRAPI_PORT int CR_disconnect_detector();
  23. /** reset the detector */
  24. CRAPI_PORT int CR_reset_detector(int);
  25. /** set the check mode for system **/
  26. CRAPI_PORT int CR_set_check_mode(int);
  27. /** set the sync mode for system **/
  28. CRAPI_PORT int CR_set_sync_mode(int);
  29. /** set the device cycle time */
  30. CRAPI_PORT int CR_set_cycle_time(int, int, int);
  31. /** set the device into the normal power mode **/
  32. CRAPI_PORT int CR_set_normal_power(void);
  33. /** set the device into the save-power mode **/
  34. CRAPI_PORT int CR_set_save_power(void);
  35. /** permit exposure */
  36. CRAPI_PORT int CR_permit_exposure();
  37. /** start grab frame */
  38. CRAPI_PORT int CR_start_acq_full_image();
  39. CRAPI_PORT int CR_start_acq_dark_full_image();
  40. CRAPI_PORT int CR_start_acq_prev_image();
  41. CRAPI_PORT int CR_start_acq_dark_prev();
  42. CRAPI_PORT int CR_start_acq_def_image();
  43. CRAPI_PORT int CR_start_acq_fluoro_image(void*, int);
  44. CRAPI_PORT int CR_start_acq_fluoro_dark_image(void*, int);
  45. /** stop grab frame */
  46. CRAPI_PORT int CR_stop_acq_frame();
  47. CRAPI_PORT int CR_stop_acq_frame_cleanup();
  48. CRAPI_PORT int CR_stop_acq_frame_linger();
  49. /** set the correction option in client **/
  50. CRAPI_PORT int CR_set_user_correction(UserCorrection*);
  51. /** get the correction option in client **/
  52. CRAPI_PORT int CR_get_user_correction(UserCorrection*);
  53. /** set the exposure dose */
  54. CRAPI_PORT int CR_set_dose(int);
  55. //get current active detector's id which used for dual detectors system
  56. //out of date
  57. CRAPI_PORT int CR_get_active_detector_ID();
  58. CRAPI_PORT int CR_set_active_detector(int);
  59. CRAPI_PORT int CR_get_dual_detector_state(DetectorActiveState*);
  60. //smart hand switch
  61. CRAPI_PORT int CR_set_smart_hand_switch(SHSParam*);
  62. CRAPI_PORT int CR_get_SHS_status(SHSStatus*);
  63. CRAPI_PORT int CR_get_wireless_ip(char*);
  64. CRAPI_PORT int CR_set_wireless_ip(char*);
  65. CRAPI_PORT int CR_get_station_mode_conf(WirelessStationConf*);
  66. CRAPI_PORT int CR_set_station_mode_conf(WirelessStationConf*);
  67. CRAPI_PORT int CR_get_temperature_cal_data(TrainHead*, int*);
  68. CRAPI_PORT int CR_check_temperature_slot(int nExpTime, float fTemperature);
  69. ////////////////////////////////////////////////////////////////////////////////////////
  70. /** read the Careray API version **/
  71. CRAPI_PORT int CR_get_API_Version(char*);
  72. /** check the socket connection state **/
  73. CRAPI_PORT int CR_get_conn_state();
  74. /** read detector type **/
  75. CRAPI_PORT int CR_get_detector_type();
  76. /** get detector information */
  77. CRAPI_PORT int CR_get_detector_info(DetectorInfo*);
  78. CRAPI_PORT int CR_get_machineID(char*);
  79. /** get mode information */
  80. CRAPI_PORT int CR_get_mode_info(int, ModeInfo*);
  81. /** get status information */
  82. CRAPI_PORT int CR_get_status_info(StatusInfo*);
  83. /** get specified detector's status information */
  84. CRAPI_PORT int CR_get_status_info_Ex(StatusInfo*, int);
  85. /** get the object frame attribution **/
  86. CRAPI_PORT int CR_get_image_attr(FrameAttr*);
  87. /** get one image **/
  88. CRAPI_PORT int CR_get_image(int,BOOL,void*);
  89. CRAPI_PORT int CR_get_unuploaded_img_info(UnuploadedImgInfo*);
  90. /** query the information of the exposure progress for device**/
  91. CRAPI_PORT int CR_query_prog_info(int,ExpProgress*);
  92. CRAPI_PORT int CR_inpaint_bad_pixels(WORD*); //ÐÞ¸´»µÏñËØ
  93. //////////////////////////////////////////////////////////////////////////
  94. /** CareRay calibration */
  95. // CRAPI_PORT int CR_set_user_cal_dir(char*);
  96. //
  97. // CRAPI_PORT int CR_load_user_cal_imgs(char*);
  98. //Load user specified calibration files used for correction
  99. CRAPI_PORT int CR_select_cal_type(char*);
  100. //////////////////////////////////////////////////////////////////////////
  101. /** CareRay calibration */
  102. CRAPI_PORT int CR_get_cal_params(CalParams*);
  103. CRAPI_PORT int CR_set_offset_correction(BOOL ofst_corr);
  104. CRAPI_PORT int CR_cal_offset(int);
  105. CRAPI_PORT int CR_linear_calibration(void);
  106. CRAPI_PORT int CR_portable_calibration(void);
  107. CRAPI_PORT int CR_execute_linear_cal();
  108. CRAPI_PORT int CR_execute_portable_cal();
  109. CRAPI_PORT int CR_stop_cal_procedure(BOOL);
  110. CRAPI_PORT int CR_start_fluoro_calibration(int);
  111. CRAPI_PORT int CR_query_calibration_status(CalibrationInfo*);
  112. CRAPI_PORT int CR_do_gridpattern_filtration(WORD*, int, int, int);
  113. //////////////////////////////////////////////////////////////////////////
  114. //soft sync API
  115. CRAPI_PORT int CR_register_callback(eventCallback);
  116. CRAPI_PORT int CR_send_exp_request(void);
  117. CRAPI_PORT int CR_ready_state_request(void);
  118. CRAPI_PORT int CR_start_soft_acquisition(void);
  119. CRAPI_PORT int CR_get_preview_image(int, BOOL, void*);
  120. CRAPI_PORT int CR_poweroff_detector(int);
  121. //AEC acquire API
  122. CRAPI_PORT int CR_set_AEC_integ_time(int prevIntegTime,int radIntegTime);
  123. CRAPI_PORT int CR_register_AEC_callback(eventCallback);
  124. CRAPI_PORT int CR_start_AEC_acquire_process();
  125. //One Key Calibration API
  126. CRAPI_PORT int CR_get_one_key_cal();
  127. CRAPI_PORT int CR_check_img_for_factory_cal(WORD* radImg);
  128. CRAPI_PORT int CR_download_factory_cal_files();
  129. CRAPI_PORT int CR_execute_one_key_cal(WORD *imgData, WORD *darkImgData, SurfaceFitResult* fitResult);
  130. //API for long integration time mode(NDT mode)
  131. CRAPI_PORT int CR_start_acq_NDT_dark_image(int);
  132. CRAPI_PORT int CR_execute_NDT_CAL(UINT*, UINT*, int);
  133. CRAPI_PORT int CR_correct_NDT_image(UINT*, UINT*, int);
  134. CRAPI_PORT int CR_set_NDT_frame_num(int);
  135. CRAPI_PORT int CR_finish_NDT_acquisition();
  136. CRAPI_PORT int CR_check_NDT_CAL_Files();
  137. #ifdef __cplusplus
  138. }
  139. #endif
  140. #endif // __CRAPI_DLL_H__