Professional Documents
Culture Documents
江苏康众数字医疗科技股份有限公司
CareRay Digital Medical Technology Co., Ltd.
Update Log
www.careray.com
IV
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Contents
API USER MANUAL.................................................................................................................................................. 1
1 INTRODUCTION .................................................................................................................................................... 1
2 GENERAL DESCRIPTION OF API FUNCTIONS, STRUCTURES, CONSTANTS, AND ERROR CODES ..... 3
3.1.23 CR_get_mode_info()........................................................................................................................................ 44
3.1.24 CR_get_status_info() ....................................................................................................................................... 45
3.1.25 CR_get_image_attr() ....................................................................................................................................... 45
3.1.26 CR_get_image()............................................................................................................................................... 45
3.1.27 CR_query_prog_info() ..................................................................................................................................... 48
3.1.28 CR_select_cal_type() ....................................................................................................................................... 48
3.1.29 CR_register_callback().................................................................................................................................... 49
3.1.30 CR_send_exp_request() ................................................................................................................................... 50
3.1.31 CR_ready_state_request() ............................................................................................................................... 50
3.1.32 CR_start_soft_acquisition()............................................................................................................................. 51
3.1.33 CR_set_active_detector() ................................................................................................................................ 51
3.1.34 CR_get_dual_detector_state() ......................................................................................................................... 52
3.1.35 CR_get_cal_params() ...................................................................................................................................... 53
3.1.36 CR_cal_offset() ................................................................................................................................................ 54
3.1.37 CR_execute_linear_cal() ................................................................................................................................. 54
3.1.38 CR_execute_portable_cal() ............................................................................................................................. 55
3.1.39 CR_stop_cal_procedure() ................................................................................................................................ 55
3.1.40 CR_set_cal_thread() ........................................................................................................................................ 56
3.1.41 CR_switch_detector() ...................................................................................................................................... 56
3.1.42 CR_get_active_detector_ID() .......................................................................................................................... 57
3.1.43 CR_linear_calibration() .................................................................................................................................. 57
3.1.44 CR_portable_calibration() .............................................................................................................................. 58
3.1.45 CR_get_one_key_cal () ................................................................................................................................... 58
3.1.46 CR_check_img_for_factory_cal ()................................................................................................................... 58
3.1.47 CR_download_factory_cal_files () .................................................................................................................. 59
3.1.48 CR_execute_one_key_cal () ............................................................................................................................ 59
3.1.49 CR_set_AEC_integ_time ().............................................................................................................................. 60
3.1.50 CR_register_AEC_callback () ......................................................................................................................... 60
3.1.51 CR_start_AEC_acquire_process () ................................................................................................................. 60
3.1.52 CR_set_smart_hand_switch () ......................................................................................................................... 61
3.1.53 CR_get_SHS_status () ..................................................................................................................................... 61
3.1.54 CR_get_unuploaded_img_info () .................................................................................................................... 61
3.1.55 CR_start_acq_dark_full_image () ................................................................................................................... 61
3.1.56 CR_set_offset_correction () ............................................................................................................................. 62
3.1.57 CR_start_acq_dark_prev () ............................................................................................................................. 62
3.1.58 CR_get_status_info_Ex() ................................................................................................................................. 62
3.1.59 CR_get_wireless_info() ................................................................................................................................... 63
3.1.60 CR_set_wireless_info () ................................................................................................................................... 63
3.1.61 CR_get_station_mode_conf() .......................................................................................................................... 63
3.1.62 CR_set_station_mode_conf() ........................................................................................................................... 64
3.1.63 CR_get_temperature_cal_data ........................................................................................................................ 64
3.1.64 CR_check_temperature_slot ............................................................................................................................ 64
www.careray.com
VI
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
www.careray.com
VII
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Figure Contents
Figure 1 Raw image matrix ....................................................................................................................................... 46
Figure 19 Different CareTouch 100 icons to indicate different states (refer to the original PDF file for colored
images)............................................................................................................................................................... 98
www.careray.com
VIII
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
www.careray.com
IX
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
1 Introduction
This manual describes API interface of medical X-ray flat panel detector produced by CareRay, including
interface functions and detailed instructions. Interface functions provide to customer in the form of
DLL(Dynamic Link Library). Customer’s program can import these DLL files and follow the predefined
Following figure shows the overall software system architecture. API interface includes detector
configuration, detector calibration, image acquisition and correction functions. Please make sure all the
relevant documents for detector configuration and image correction are saved in the corresponding directory.
The interface functions are programmed using ANSIC. The return type of all functions is integer,
This software can run on Windows XP/Vista/7/8/10, 32 bits or 64 bits OS. As the details specified bellow,
the Yellow shaded contents stand for the updated places in this version compared with the last version.
www.careray.com
1
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
User Interface
DROC Layer
Detector Control
Image Display
API Invoke
System/configuration/network
management
Middle Layer Sync control、Image acquisition
and calibration Image
Acquisition/Correction
Network
!
Configuration and calibration files should be saved under the host’s specified
directories.
www.careray.com
2
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
The data types used for the definition of functions and parameters are:
The data type of Rad image and 2×2 Binning image is WORD, while Preview
image (32×32 Binning) is UINT.
www.careray.com
3
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
14 CR_stop_acq_frame_cleanup Stop exposure flow, and clear the buffer of image sending end
www.careray.com
4
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Get current active panel ID(0: the first detector,;1: the second
42 CR_get_active_detector_ID
one)
instead.
www.careray.com
5
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
1. UserCorrection
www.careray.com
6
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
struct UserCorrection
Define the image correction options
Index Member Description
Only one correction method can be set as TRUE. When setting certain item as
!
TRUE, the acquired image will be corrected using corresponding offset, gain, and
defect correction files. If all the items are set as FALSE, the acquired image will not
do any correction.
!
Correction type varies from each type of detector.
www.careray.com
7
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
CareView 1500R √ √ ×
CareView 1500L √ √ ×
CareView 750M √ √ ×
CareView 1500C √ × √
CareView 1500P √ × √
CareView 1500Rm √ × √
CareView 500P √ × √
CareView 1500Cw √ × √
CareView 300P √ × √
CareView 750M √ √ ×
CareView 1800L √ √ ×
CareView 1800RV2 √ √ ×
CareView 1500PRV2 √ × √
CareView 750Cw √ × √
CareView 750C √ × √
CareView 1800Cw √ × √
CareView 1500S √ × √
CareView 750S √ × √
2. DetectorInfo
struct DetectorInfo
Define the detector’s system information structure
Index Member Description
1 int rawImageWidth Width of raw image
2 int rawImageHeight Height of raw image
3 int maxPixelValue Max pixel value, 65535
4 int bitsPerPixel Single pixel bit depth
5 char hardWareVersion[STRLEN] Hardware version information
6 char softWareVersion[STRLEN] Software version information
7 char serialNumber[STRLEN] Serial number of detector
8 char detectorDescription[STRLEN] Descriptions about current detector
www.careray.com
8
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
3. ModeInfo
struct ModeInfo
Define detector work mode structure
Index Member Description
1 int modeId Work mode id
Image acquisition type at current work mode. 0: Rad mode; 1:
2 int acqType
Fluoro mode
3 int imageWidth Image width at current work mode
4 int imageHeight Image height at current work mode
Pixel number per image line occupies. The value is greater
5 int linesPerPixel
than 1 means that the detector works inBinning mode
Pixel number per image column occupies. The value is
6 int colsPerPixel
greater than 1 means that the detector works inBinning mode
Total image length, including image head length and data
7 int imageSize
length. Unit: byte.
8 float maxFrameRate Max frame rate per second in current work mode
9 char modeDescription[STRLEN] Descriptions about current mode
4. StatusInfo
struct StatusInfo
Description of detector status infomation
Index Member Description
1 int currentMode Current check mdoe
2 int detectorState Current detector state
3 float frameRate Frame rate
4 Temperature temperature Internal temperature information, see following table
5 BatteryInfo batInfo Battery information, see following table
6 Wireless Infowireless_info Wireless communication information, see following table
5. Temperature
struct Temperature
Define detector’s temperature information
Index Member Description
www.careray.com
9
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
6. Battery
struct BatteryInfo
Define wireless detector’s battery information
Index Member Description
1 int manu_access
2 int alarm_capa Unit: mAh
3 int alarm_time Unit: min
4 int mode Range: 0x0000~0xffff
5 int atrate Range: -32768mA~32768mA
6 int atrate_tofull Unit: min
7 int atrate_toempty Unit: min
8 int atrate_ok Unit: min
9 float temperature Unit: C
10 float voltage Unit: V
11 float current Unit: A
12 float ave_current Unit: A
13 float max_error
14 float relative_state_of_charge Dump energy (decimals format)
15 float absolute_state_of_charge
16 int rest_capacity Unit: mAh
17 int full_capacity Unit: mAh
18 int run_time_to_empty
19 int ave_time_to_empty
20 float charging_current Unit: A
21 float charging_voltage Unit: V
22 int battery_status Battery state, 0: charge, 1: discharge
www.careray.com
10
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
23 int cycle_count
24 int design_capacity Unit: mAh
25 float design_voltage Unit: V
26 float cell4_voltage Unit: V
27 float cell3_voltage Unit: V
28 float cell2_voltage Unit: V
29 float cell1_voltage Unit: V
7. WirelessInfo
struct WirelessInfo
Define wireless detector’s wireless status
Index Member Description
1 char essid[32] Session ID
2 char mode[16] Wireless mode ID
3 char freq[16] Wireless mode frequency
4 char channel[16] Wireless mode channel
5 char bit_rate[16] Bit rate
6 char encypt_key[64] Encypt key
7 char security_mode[16] Security mode
8 char link_quality[16] Wireless link quality
9 char signal_level[16] Signal level
10 char noise_level[16] Noise level
11 char sensitivity[16]
12 char reserved1[16]
13 unsigned long long tx_packets Sent data package number
14 unsigned long long rx_packets Received data package number
15 unsigned long long tx_bytes Sent data length in bytes
16 unsigned long long rx_bytes Received dala length in bytes
17 int reserved[64]
8. FrameAttr
struct FrameAttr
Define image’s attribute information
Index Member Description
www.careray.com
11
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
9. ExpProgress
struct ExpProgress
Define image acquisition progress and status information
Index Member Description
Work state:
CR_EXP_ERROR(-1): detector stays in error state
CR_EXP_INIT(0): detector stays in initial state
CR_EXP_READY(1): detector is in ready state, and
waiting for exposure signal to come (only for External
Sync Mode)
CR_EXP_WAIT_PERMISSION(2): detector gets the
1 int expStatus X-ray exposure request signal arrives, and waits for
PC’s permission.
CR_EXP_PERMITTED(3): detector gets the permitted
signal from PC.
CR_EXP_EXPOSE(4): detector works in integration
time state.
CR_EXP_COMPLETE(5): X-ray exposure finishes, and
detector is ready to transfer the image.
2 BOOL inside_offs_corrflag
3 BOOL dark_reqflag
4 int frameNum
5 BOOL fetchable TRUE(1), the image is ready; otherwise is FALSE(0).
6 int errorCode Nonzero means calibration error.
TRUE(1), image calibration finish; FALSE(0), image
7 BOOL calComplete
calibration is still in process.
Used at AED or Manual Sync Mode (no sync cable).
8 BOOL expose_flag FALSE(0) means not press hand switch, while TRUE(1)
means hand switch pressed.
www.careray.com
12
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
!
This structure plays an important role at Rad mode, ExpStatus saved current
detector’s work state, whose value varies from work state’s change.
10. DetectorActiveState
struct DetectorActiveState
Define the dual detectors’ state information
Index Member Description
Current applicate detector number
1 int detectorNum 1, single panel
2, two panels
2 int detectorAType Detector A type in dual_panel system, see enum DetectorType
3 int detectorBType Detector B type in dual_panel system, see enum DetectorType
Active detector ID
4 int activeDetectorID 0 means detector A, whose IP is 192.168.68.1
1 means detector B, whose IP is 192.168.68.2
Detector A connection state,
5 BOOL detectorAstate TRUE(1), connected
FALSE(0), disconnected
Detector B connection state
6 BOOL detectorBstate TRUE(1), connected
FALSE(0), disconnected
11. irDA
struct irDA
Define the infrared distance sensor parameters
Index Member Description
1 int irDAEnable Sensor enable / disable
www.careray.com
13
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
12. SHSParam
struct SHSParam
Define the CareTouch 100 parameters
13. SHSStatus
struct SHSStatus
Define CareTouch 100 status information
Index Member Description
Connection state between hand switch and detector, please refer to
1 int connectedToDetector
Chapter 4.7
2 int beingTouched Jf the hand switch had been touched
int
3 Hand switch battery remain capacity (0 ~ 100)
batteryRemainingCapacity
4 int signalIntensity Communication quality between hand switch and detector (0~100)
5 int secondsLeft Auto shut down seconds left time (0~7200s)
SHSParam
6 Hand parameter configuration, see above structure
handSwitchSettings
www.careray.com
14
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
14. SurfaceFitResult
struct SurfaceFitResult
Define the return result of one key calibration
Index Member Description
1 float R2 Score of calibration
2 int x0 Reserved
3 int y0 Reserved
4 float param1 Reserved
5 float param2 Reserved
6 float param3 Reserved
7 float param4 Reserved
15. UnuploadedImgInfo
struct UnuploadedImgInfo
Define the resume broken image information
Index Member Description
1 BOOL existFlag If exist resume broken image flag
2 int width Image width
3 int height Image height
4 float finishedRate Resume image transferred rate
5 BOOL withHead If with head flag
6 int bitDepth Resume image pixel bit depth
16. WirelessStationConf
struct WirelessStationConf
Wirelss station mode configurations
Index Member Description
char
1 Wireless SSID
wireless_station_SSID[256]
2 char wireless_mode[256] Wireless mode, supported “6” and “11”
www.careray.com
15
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
17. TrainHead
struct TrainHead
Temperature slot information
Index Member Description
1 float temperature Temperature of slot
2 int integTime Integration time of slot
3 int generatedTime Generated time of slot (unit: total days)
18. TemperatureSlotWarnMsg
struct TemperatureSlotWarnMsg
Information about temperature slot absence
Index Member Description
1 int nDetectorID Detector ID
2 int nMissingExpTime Integration time of absence temperature slot
float Temperature of absence temperature slot
3
fMissingTemperature
float Detector temperature
4
fCurrentTemperature
float Temperature tolerance range
5
fToleranceTemperature
19. TemperatureSlotTrainMsg
struct TemperatureSlotTrainMsg
Temperature slot train information
Index Member Description
1 int nDetectorID Detector ID
2 int nExpTimeOfSlot Integration time of training slot
3 int fTemperatureOfSlot Temperature of training slot
www.careray.com
16
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
1. ExposureStatus
enum ExposureStatus
Define all the work state at External Sync Mode. Call CR_query_prog_info() to get current state
Index Member Enum Value Description
exposure request
2. SyncMode
enum SyncMode
www.careray.com
17
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
3. ImageDataType
enum ImageDataType
Define the image pixel data type, call CR_get_image_attr() to get image data type in structure FrameArrt
Index Member Enum Value Description
3 INT_16 2 Reserved
4 INT_32 3 Reserved
5 FLOAT_32 4 Reserved
6 DOUBLE_64 5 Reserved
4. DetectorType
enum DetectorType
www.careray.com
18
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
5. TempStatus
enum TempStatus
www.careray.com
19
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
6. EventId
enum EventId
5 EVT_EXPOSE_FLAG_TRUE 4 Reserved
6 EVT_EXPOSE_FLAG_FALSE 5 Reserved
……
19 EVT_TEMPERATURE_SLOT_MISSING 18 Temperature slot absence
20 EVT_TEMPERATURE_SLOT_TRAIN_START 19 One temperature slot train starts
One temperature slot train
21 EVT_TEMPERATURE_SLOT_TRAIN_FINISH 20
successfully finished
22 EVT_TEMPERATURE_SLOT_TRAIN_ABORT 21 One temperature slot train aborted
7. TemperatureSlotStatus
enum TemperatureSlotStatus
www.careray.com
20
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
In the ".../CareRay" folder, there are "Config.ini" file, "conf" folder and "logs" folder.
Config.ini: It contains some important detector configuration and protocol parameters. It is used by
API functions.
conf: "cfg.properties" file in this folder also contains some detector configuration and calibration
parameters. CAL, CarerayImageNDT and API need to read this file and get some value.
2.4.1 Config.ini
Following lists some common used data:
Item Description
ipAddress Default IP address of detector, if there is only one detector in DR system
IP address of the second detector. User should remove the semicolon before
ipAddress1 the item to enable this parameter when the system needs to apply dual
panels
Pixel number need to be cut off at vertical edges of the image (default as 4
vertical_cutoff
for each vertical edge. API will set the gray level value of these pixels as 0)
Pixel number need to be cut off at horizontal edges of the image (default as
horizontal_cutoff 4 for each horizontal edge. API will set the gray level value of these pixels
as 0)
realtime_offset Real time offset correction option (default as 0, disable the option)
Time interval of getting a real time offset image. If the time exceeds the
realtime_offset_interval time interval, detector will get a real time offset image before acquiring
Rad image
2.4.2 cfg.properties
The following table lists some common used data:
Item Description
linearNumPerDose Number of Rad image per dose setting during Gain Calibration procedure
Time interval between two images acquisition during Offset and Gain
Unit: ms.
The path where Calibration files save. If such path is not created, the
base_dir
default path is under the application directory.
Unit: kV.
The types of calibration files, such as table, wall, and son on. If it is need to
change the calibration files, user can enable the corresponding item. If
type.
Real time offset correction option. Default value as 0, disable this function.
enableRealTimeOffset
It mainly uses in AED Sync Mode.
www.careray.com
22
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
The return value CR_NO_ERR(0) means the function is called successfully. Mostly the return value with
nonzero means that the function is called failed. The error value shows specified error type. The error codes and
www.careray.com
23
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
receive data
Mismatched versions
1013 Set version failed
between detector and SDK
1014 Wrong command ID Command ID error -
Wrong version. This error
1015 will be obsoleted in a future Version error -
release
Wrong parameter in a
1016 command package sent Parameter error -
from API to detector
A NULL pointer must not
1017 Buffer is null Software allocate memory failed
be passed to a function
Read configuration files failed, the
1018 Error reading configure file Read configuration failed file may had error or the file is not
1022 Error loading DLL files Load dll failed in the same directorydirectory or lack
of dll files.
www.careray.com
24
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
1035 Error allocating memory Allocate memory failed Program allocate memory failed
1037 Error acquiring an image Get image failed connection in abnormal state, or
www.careray.com
25
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
www.careray.com
27
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Calibration file does not Machine ID is not match The file is not generated by current
1076
pair with the detector when exchange files detector
www.careray.com
28
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
0 No error No error -
1 load device driver failed load device driver failed
open detector file open detector file descriptor
2
descriptor failed failed
map detector
3 map detector memory failed
memory failed
allocate detector memory allocate detector memory
4
failed failed
No enough space on SD
5 No enough space on SD card
card -
6 No enough Space on Flash No enough Space on Flash
File name is invalid, failed File name is invalid, failed to
7
to exchange exchange
File path is Invalid, failed File path is Invalid, failed to
8
to exchange exchange
9 File read error File read error
10 file write error file write error
11 Bad XML file Bad XML file
www.careray.com
30
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
www.careray.com
31
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
www.careray.com
32
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Config.ini is the configuration file for API, which is located in ".../CareRay" folder.Please do
!
The dll files, "CareRay" folder, and all software application files *.exe should be located in the
same directory.
!
The path of CarerayImageNDT.exe file can’t contain Chinese characters.
3.1.1 CR_connect_detector()
Load and initialize the DLL, and establish network connection with detector.
Description
It’s the first function called by customer’s application.
work_dir
Params
Directory where Config.ini file locates . It’s a string with length less than 256 characters.
characters, the network state is normal, and the IP address sets right at first.
www.careray.com
33
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
3.1.2 CR_disconnect_detector()
Signature int CR_disconnect_detector ()
Params None
3.1.3 CR_reset_detector()
Signature int CR_reset_detector (BOOL reboot)
reboot
Params FALSE, set detector state to default value;
TRUE, reboot the detector.
Zero , means the function call successful;
Return
Nonzero, means the function call failed.
!
After connecting successfully, reset the detector state by calling this function (set reboot to
FALSE). If reconnecting, this step can be skipped.
www.careray.com
34
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
3.1.4 CR_set_check_mode()
Signature int CR_set_check_mode (int mode_id)
Description Set check mode, such as Rad Mode, Preview Mode, Fluoro Mode, etc.
mode_id
Params
check mode ID, see enum CheckMode in structures.h file provided by API
All supported check mode please see the table in section 4.2.5.
If current detector doesn’t support the selected check mode, or the image acquisition is in
! process while setting check mode, this function will return error.
3.1.5 CR_set_sync_mode()
Signature int CR_set_sync_mode (int sync_mode)
Description Set sync mode for detectors such as external, manual, software, AED sync mode.
sync_mode
Params
sync mode ID, see enum type of SyncMode in structures.h in API_demo
www.careray.com
35
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
needs to take it as warning that the acquired image may contain step).
All supported sync mode please see the table in section 4.2.5.
!
This function should be called after CR_set_check_mode().
If user does not select a sync mode,or selected sync mode does not match the check mode, this
3.1.6 CR_set_cycle_time()
Signature int CR_set_cycle_time (int exp_time, int delay_time, int wait_time)
Set each phase time in an image acquisition period in certain sync mode;
Description The default values of the parameters are given in attached file 1 “Overall image acquisition
flow diagram”.
exp_time
delay_time
Params
delay time, number greater than 0. Unit: millisecond.
wait_time
www.careray.com
36
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
The default sycle time settings please see details of the table in section 4.2.5.
After calling CR_set_sync_mode() or changing the sync mode by other way, please call this
! function.
3.1.7 CR_set_normal_power()
Signature int CR_set_normal_power ()
Params None
During image acquisition procedure, call this function before acquiring an image, otherwise the
The application of using the second gear to trigger the power change should not use this
function.
Don’t let detector stay in full-power work condition for a long time. Call the function
! CR_set_save_power() after image acquisition to reduce heat generation and save energy.
3.1.8 CR_set_save_power()
Signature int CR_set_save_power ()
Params None
www.careray.com
37
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
If the parameter “fetchable” in structure exp_info turns to TRUE, user should call this function.
Developers should pay attention to this function to reduce system heat and improve system
stability.
When quit the check mode, or there is no more position to be checked, switch the detector to save power
condition;
Last more than 5 minutes in check mode, switch the detector to save power condition, and quit current
GUI;
when enter the GUI with none-check mode, switch the detector to save power condition.
3.1.9 CR_permit_exposure()
Signature int CR_permit_exposure ()
Permit the detector to accept the X-ray exposure and start to acquire an image.
Description
This function is only used at External Sync Mode (EXT_SYNC).
Params None
www.careray.com
38
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
This function is only used in External Sync Mode (EXT_SYNC). When the detector is already
! in WAIT_PERMISSION state, call this function to permit the detector to acquire an image.
3.1.10 CR_start_acq_full_image()
Signature int CR_start_acq_full_image ()
Description Tell the detector to prepare for acquiring a Rad Mode image.
Params None
If return 58, means the transfer failed image exists in detector need to be resume transferred.
3.1.11 CR_start_acq_prev_image()
Signature int CR_start_acq_prev_image ()
Description Tell the detector to prepare for acquiringa preview resolution image under Preview Mode.
Params None
3.1.12 CR_start_acq_def_image()
Description Tell the detector to prepare for acquiringa user-defined resolution image (testing).
Params None
www.careray.com
39
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
3.1.13 CR_stop_acq_frame()
Signature int CR_stop_acq_frame ()
Params None
If the detector is in ready state, the user can call this function to go back to initial state. Another
!
condition is that, When the DROC software is working in patient check page and the detector is
in ready state, but the user presses the stop button to quit, this function should be called.
3.1.14 CR_stop_acq_frame_cleanup()
Signature int CR_stop_acq_frame_cleanup ()
Description Stop the image acquisition flow, and clear up the DMA image buffer of the detector.
Params None
If fail in getting an image from the detector buffer and the user choosing not to resend the image,
3.1.15 CR_set_user_correction()
Signature int CR_set_user_correction (UserCorrection* corr)
www.careray.com
40
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
This function is called to enable or disable the image correction procedure, or select the
The acquired image will be corrected by relevant method after calling this method.
!
This function will work based on the existence of the calibration files, which are generated
If this function called failed, the probable reason are: 1) The detector does not support the
!
correction option; 2) There are no calibration files: 3) User deletes the calibration files by
mistake.
3.1.16 CR_get_user_correction()
Signature int CR_get_user_correction (UserCorrection* corr)
corr
Params Current image correction option will be stored in structure corr if this function is called
successfully.
www.careray.com
41
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
3.1.17 CR_inpaint_bad_pixels()
Signature int CR_inpaint_bad_pixels (WORD* rad_img)
Inpaint the defects in an acquired image according to the bad pixels map generated in image
Description
calibration procedure.
rad_img
Params A target image pointer which starts from the origin address of image buffer allocated by
user.
After DROC removing the grid pattern, call this function to inpaint bad pixels existing in the
! image.
3.1.18 CR_set_dose()
Signature int CR_set_dose (int kv_num)
kv_num
www.careray.com
42
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
When using CareView 1500Rm or 1500P to get a Rad image, the reference gain image
! When solving the X-ray backscatter problem of some type of detectors, the gain correction
method needs to use the reference gain image at the actual set kV value.
When entering a new image acquisition procedure, user can obtain the kV value recommended
!
by DROC. The kV value must be set the same as next X-ray exposure used.
!
This function is not used for CareView 1500R, 1800R, 500M, 1800I.
3.1.19 CR_get_API_version()
Signature int CR_get_API_version (char* ver)
ver
Params
version information. Size: 50 bytes.
3.1.20 CR_get_conn_state()
Signature int CR_get_conn_state ()
Params None
1, means connected;
Return
0, means disconnected.
www.careray.com
43
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
It will take about 20 seconds for API to find out that the connection is disconnected.
!
3.1.21 CR_get_detector_type()
Signature int CR_get_detector_type ()
Params None
!
Connect the detector before calling this function. The return value of this function gives the
detector type.
3.1.22 CR_get_detector_info()
Signature int CR_get_detector_info (DetectorInfo* detector_info)
3.1.23 CR_get_mode_info()
Signature int CR_get_mode_info (int modeId, ModeInfo* mode_info)
www.careray.com
44
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
3.1.24 CR_get_status_info()
Signature int CR_get_status_info (StatusInfo* status_info)
3.1.25 CR_get_image_attr()
Signature int CR_get_image_attr (FrameAttr* obj)
Description Get image information such as width, height, pixel depth, and so on
Call this function before calling get_image() when “fetchable” is TRUE, and aftercalling
3.1.26 CR_get_image()
Signature int CR_get_image (int image_size, BOOL with_head, void* image_ptr)
www.careray.com
45
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Read image from detector (Rad or dark image) to the buffer image_ptr. Image
Description
format is named *.raw. See the following form.
image_size
with_head
Params TRUE: ouput image with head whose size is 65536 bytes;
image_ptr
User application software needs to convert the *.raw image format to DICOM which widely
Image
Width
Figure 1 Raw image matrix
The *.raw image data received from detector is a one-dimensional array, sorted as follows:
www.careray.com
Height
46 lines Pixel data
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
www.careray.com
47
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
3.1.27 CR_query_prog_info()
Signature int CR_query_prog_info (int prog_type, ExpProgress* exp_prog)
prog_type
procedure;
procedure.
exp_prog
3.1.28 CR_select_cal_type()
Signature int CR_select_cal_type (char* name)
name
Calibration type name, such as “default”, “table”, “wall”, “filter-1”, “filter-2”, et al. When
Params
calling CR_set_user_correction(), API will load these calibration files whose name contains one
!
This function should be called before CR_set_user_correction().
www.careray.com
48
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
The following callback function prototype and API interfaces (3.1.29-3.1.33) are used for Software Sync
Mode.
eventID
Return None
struct Event
int width;
int height;
int bits;
void* data;
};
This function pointer should be transmitted to API, and API will transmit the specified event of
! detector to user application software. The event needs to be processed in time by user software.
3.1.29 CR_register_callback()
Signature int CR_register_callback (eventCallback)
Description Register callback function, and notify API of the callback function address
eventCallback
Params
callback function pointer which needs to be registered
www.careray.com
49
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
!
This function is only used for Software Sync Mode so far.
3.1.30 CR_send_exp_request()
Signature int CR_send_exp_request ()
Send exposure signal to detector, which equals pushing down the second gear of hand switch.
Description
User can call this API at any time when detector enters Ready state.
Params None
3.1.31 CR_ready_state_request()
Signature int CR_ready_state_request ()
Params None
This function should be executed after the generator is ready. Because the generator in ready
!
state equals pushing down the hand switch’s first gear in External Sync Mode, the detector
www.careray.com
50
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
3.1.32 CR_start_soft_acquisition()
Signature int CR_start_soft_acquisition ()
Description Start the Rad image acquisition flow in Software Sync Mode
Params None
This function will query the detector state, and transmit these status to user application software
Detector sends the following three status to user application software in Software Sync Mode:
READY: User can push down hand switch to start X-ray exposure;
EXPOSE: Exposure enable status, user application software can control the generator to generate
X-ray;
IMAGE_ARRIVE: Notify user application software that the image has arrived to console memory.
If user application software wants to exit Software Sync Mode, the function
3.1.33 CR_set_active_detector()
Signature int CR_set_active_detector (int detector_index)
Params detector_index
www.careray.com
51
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
The IP addresses of the two detectors are set as 192.168.68.1 and 192.168.68.2.
!
If this function returns error, the probably reason is that the network is in abnormal state.
If using dual-panel system, user should set MAC address and IP address differently for these
3.1.34 CR_get_dual_detector_state()
Signature int CR_get_dual_detector_state (DetectorActiveState* das)
Description Get dual-panel state info, which saves in the structure das.
das
Params
See structure DetectorActiveState
!
User should call this function at any time to get the dual-panel state.
www.careray.com
52
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
To support the dual-detector system, except calling this function, user should set MAC and IP
Using the POWERS group, user can remotely log in the detector management GUI, set the first detector
IP address to 192.168.68.1, and the second detector IP address as 192.168.68.2, and allocate the two detectors
with different MAC addresses. For details, please ask CareRay's technical support engineers for help.
User should do initialization work such as selecting check mode and sync mode, setting
! correction option and so on after calling this function to switch to designated detector.
CareRay's dual-panel system solution is not restricted to the same type detector. Different
3.1.35 CR_get_cal_params()
Signature int CR_get_cal_params (CalParams* cal)
Cal
www.careray.com
53
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
linear_num_per_dose, number of Rad images acquired per dose during gain calibration
procedure
3.1.36 CR_cal_offset()
Signature int CR_cal_offset (int modeID)
Execute offset calibration procedure for multiple integration time points at different sync
Description
modes according to the setting of DetectorConf.xml (located in “conf” folder of SDK package)
modeID
Params
check mode ID
This function will establish a thread to get a series of offset images to calculate and obtain offset
! calibration files.
3.1.37 CR_execute_linear_cal()
Signature int CR_execute_linear_cal ()
Description Generate calibration files for fixed detectors after receiving all the images needed.
Params None
www.careray.com
54
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
!
This function is only used for fixed detectors.
3.1.38 CR_execute_portable_cal()
Signature int CR_execute_portable_cal ()
Description Generate calibration files for portable detectors after receiving all images needed
Params None
!
This function is only used for portable detectors.
3.1.39 CR_stop_cal_procedure()
Signature int CR_stop_cal_procedure (int state)
Set a state for image calibration to notify the detector whether to exit the calibration procedure
Description
or not.
state
www.careray.com
55
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
3.1.40 CR_set_cal_thread()
Signature int CR_set_cal_thread (int state)
Set a state for image calibration to notify the detector whether to exit the calibration procedure
Description
or not.
state
This function is out of date, please use the function of CR_stop_cal_procedure() instead. but
3.1.41 CR_switch_detector()
Signature int CR_switch_detector (int detector_index)
detector_index
The IP addresses of the two detectors are set as 192.168.68.1 and 192.168.68.2.
www.careray.com
56
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
This function is out of date, please use the function of CR_set_active_detector() instead. But
3.1.42 CR_get_active_detector_ID()
Signature int CR_get_active_detector_ID ()
Params None
This function is out of date, please use the function of CR_get_dual_detector_state() instead.
3.1.43 CR_linear_calibration()
Signature int CR_linear_calibration ()
Description Generate calibration files for fixed detectors after receiving all images needed
Params None
www.careray.com
! 57
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
This function is out of date, please use the function of CR_execute_linear_cal() instead. But user can still use it for
compatibility.
3.1.44 CR_portable_calibration()
Signature int CR_portable_calibration ()
Description Generate calibration files for portable detectors after receiving all images needed
Params None
!
This function is out of date, use CR_execute_portable_cal() instead, but user can still use it.
3.1.45 CR_get_one_key_cal ()
Signature int CR_get_one_key_cal ()
Params None
3.1.46 CR_check_img_for_factory_cal ()
Signature int CR_check_img_for_factory_cal (WORD* radImgNoHeader)
check whether the first rad image satisfied the requirements, such as mean value, uniform,
Description
center alignment.
www.careray.com
58
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
radImgNoHeader
Params
rad image without image header acquired by exposure
This function only used for checking the first rad image meets the requirement when executing
3.1.47 CR_download_factory_cal_files ()
Signature int CR_download_factory_cal_files ()
Params None
This function only used for downloading gain and defect files generated in factory calibration, if
! call failed, user can’t do one key calibration (see API demo).
3.1.48 CR_execute_one_key_cal ()
int CR_execute_one_key_cal (WORD* imgData, WORD* darkImgData,
Signature
SurfaceFitResult* fitResult)
Description Calculate one key calibration files according to input rad and offset images
imgData
www.careray.com
59
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
fitResult
3.1.49 CR_set_AEC_integ_time ()
Signature int CR_set_AEC_integ_time (int prevIntegTime, int radIntegTime)
prevIntegTime
integration time for preview image
Params
radIntegTime
integration time for normal image
Zero , means the function call successful;
Return
Nonzero, means the function call failed.
3.1.50 CR_register_AEC_callback ()
Signature int CR_register_AEC_callback (eventCallback)
3.1.51 CR_start_AEC_acquire_process ()
Signature int CR_start_AEC_acquire_process ()
Params None
www.careray.com
60
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
3.1.52 CR_set_smart_hand_switch ()
Signature int CR_set_smart_hand_switch (SHSParam* param)
3.1.53 CR_get_SHS_status ()
Signature int CR_get_SHS_status (SHSStatus* status)
3.1.54 CR_get_unuploaded_img_info ()
3.1.55 CR_start_acq_dark_full_image ()
Signature int CR_start_acq_dark_full_image ()
Start image acquisition workflow,
Description
Ready to acquire a dark image in full resolution
Params None
www.careray.com
61
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
3.1.56 CR_set_offset_correction ()
Signature int CR_set_offset_correction (BOOL ofstCorr)
ofstCorr
Params TRUE: do offset correction
FALSE: skip offset correction
Zero , means the function call succeeded;
3.1.57 CR_start_acq_dark_prev ()
Signature int CR_start_acq_dark_prev ()
3.1.58 CR_get_status_info_Ex()
Signature int CR_get_status_info _Ex(StatusInfo* status_info, int detectorID)
Description Get specified status information of the detector (used for dual panels case).
www.careray.com
62
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
3.1.59 CR_get_wireless_info()
Signature int CR_get_wireless_ip(char* pWirelessIP)
pWirelessIP
Params
store the detector’s wireless IP
Zero , means the function call successful;
Return
Nonzero, means the function call failed.
3.1.60 CR_set_wireless_info ()
Signature int CR_set_wireless_ip(char* pDstWirelessIP)
pDstWirelessIP
Params
customized wireless IP
Zero , means the function call successful;
Return
Nonzero, means the function call failed.
3.1.61 CR_get_station_mode_conf()
Signature int CR_get_station_mode_conf(WirelessStationConf* pWsc)
pWsc
Params
store the station mode configuration
www.careray.com
63
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
3.1.62 CR_set_station_mode_conf()
Signature int CR_set_station_mode_conf(WirelessStationConf * pDstWsc)
pDstWsc
Params
customized station mode configurations
Zero , means the function call successful;
Return
Nonzero, means the function call failed.
3.1.63 CR_get_temperature_cal_data
Signature int CR_get_temperature_cal_data (TrainHead* pTrainHeader, int* pTempSlotNum)
pTrainHeader
Params Array type, store the temperature slot information, see TrainHead structure
pTempSlotNum
Store the pTrainHeader’s length
Zero , means the function call successful;
Return
Nonzero, means the function call failed.
3.1.64 CR_check_temperature_slot
nExpTime
Params Integration time of slot
fTemperature
www.careray.com
64
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Temperature of slot
3.1.65 CR_start_acq_NDT_dark_image
Signature int CR_start_acq_NDT_dark_image (int nFrameNum)
nFrameNum
Params
accumulated image number in detector
Zero , means the function call successful;
Return
Nonzero, means the function call failed.
3.1.66 CR_execute_NDT_CAL
Signature int CR_execute_NDT_CAL (UINT* pRadImg, UINT* pDarkImg, int nPixelNum)
pRadImg
rad image
pDarkImg
Params
dark image
nPixelNum
3.1.67 CR_correct_NDT_image
Signature int CR_correct_NDT_image (UINT* pRadImg, UINT* pDarkImg, int nPixelNum)
pRadImg
rad image
pDarkImg
Params
dark image
nPixelNum
the image’s pixelnum
Zero , means the function call successful;
Return
Nonzero, means the function call failed.
3.1.68 CR_set_NDT_frame_num
Signature int CR_set_NDT_frame_num (int nFrameNum)
nFrameNum
Params
accumulated images number in detector
Zero , means the function call successful;
Return
Nonzero, means the function call failed.
3.1.69 CR_finish_NDT_acquisition
Signature int CR_finish_NDT_acquisition ()
Description This API make detector stop accumulating images in NDT_mode + manual sync mode
Params None
3.1.70 CR_check_NDT_CAL_Files
Signature int CR_check_NDT_CAL_Files ()
www.careray.com
66
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Params None
4 Image acquisition
Preview Mode: Preview radiography mode, pixel value processed by 32×32 binning;
Binning Mode: Binning radiography mode, pixel value processed by 2×2 binning;
Synchronization modes are defined as the coordination between the flat panel detector and the generator.
CareRay's series detectors support External, Manual, AED and Software Sync Mode.
www.careray.com
67
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Preserved
e
bl
na
le
am && ==e
ab
st
us
is
at
st
e
_
HS
Fr
et
G
EXP_ EXP_
t
eOu
READY COMPLETED
Tim
Ext_Rsq
EXP_
EXP_
EXPOSING
AWAITING
Ho CQ or
st
PC tor A erat
n
Pe tec Ge
rm De ray
it X-
EXP_ To
PERMITTED
EXP_ERR, detector cannot pass the self test and is in error state;
EXP_READY, detector is in ready state, and waiting for external exposure request signal;
EXP_AWAITING, the external exposure request has come to detector, and it is waiting for the
EXP_COMPLETED, the X-ray exposure and detector integration time procedure have finished.
www.careray.com
68
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Gen Prepare
Gen Ready
X-ray ON
Det Init
Det Ready
Exp Await
Exp Permit
Exposing
Exp Complete
Image Fetchable
For fixed-delay external synchronization (with firmware support), the internal between sending
the exposure request and receiving the enable exposure signal is fixed (the specific time interval
! is solidified in the detector). The interval of polling exposure state must be 50ms (see 4.3) in
software acquisition.
and the red-yellow-green bar direction on GUI to complete the image acquisition.
The following diagram shows the time series how the detector state goes through (Notice that the marked
www.careray.com
69
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Application software should display the corresponding colors above properly to inform user. By adjusting
the reasonable delay time, user can push down hand switch to trigger an exposure event within any period of
During the integration time, the exposure flag becomes TRUE which means the exposure
! request allowed. In other phases, the exposure flag is FALSE, then the exposure request is
forbidden.
www.careray.com
70
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Gen Prepare
Gen Ready
X-ray ON
Det Init
Exp Permit
Image Fetchable
Currently the fixed DR system uses External Sync Mode (using a sync cable to connect generator and
detector). But it is not convenient for portable and wireless use. The detector state switch according to the red
and green light bars in Manual Sync Mode for wireless detector is also not convenient for bedside DR system
application. The Software Sync Mode has the flexibility which the External Sync Mode and Manual Sync
Software Sync Mode has good time efficiency which almost equals to the External Sync Mode in
performance. User should control the software response time delay while design the application software.
Software Sync Mode is realized using callback function. The detector time flow chart is as following:
www.careray.com
71
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Gen Prepare
Gen Ready
X-ray ON
Det Init
Det Ready
Exp Enable
Image Arrive
www.careray.com
72
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Call API to establish Establish network socket with Answer communication request
communication detector and feedback
Call API to reset detector Send reset command to detector Answer reset signal
Select sync mode as software Notify detector to set software Answer this command and
sync mode sync mode confirm control way
Call API to request detector to Notify detector to enter to high Answer request to set detector
enter to Ready state consumption to high consumption state
Call API to get image Get image from detector Send image to console
Save image
www.careray.com
73
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
READY == status ?
Ready state Y
EXPOSE == status ?
Expose state
Y
TRUE == fetchable ?
Y
Image_ready
state
Call callback function to notify DROC image arrives
CR_get_image
www.careray.com
74
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
software sync signal. Essentially AED Sync Mode is also a kind of Auto Sync Mode, which is different from
Manual Sync Mode . User can push down hand switch at any time to get Rad image if the specified image
If user wants to use AED Sync Mode, it is needed to calibrate the detector at Manual Sync Mode, then
switch to AED Sync Mode to get corrected images. See details in API demo.
AEDSync Mode supports real time offset correction. User can control the detector to get another real
time offset image when acquiring the Rad image, and the offset image is used for offset correction. The details
is implemented in API.
CareRay detector does not support image calibration in AED Sync Mode. Be careful to set
CareRay detector supports real time offset image correction in AED Sync Mode.
Detector time flow chart in AED Sync Mode is as following. Please pay attention to the difference
www.careray.com
75
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Gen Prepare
Gen Ready
X-ray ON
Det Init
Exp Permit
Image Fetchable
Delay Image
Detector Standby …… Integration Time …… Standby
Time Acquisition
4.2.5 Sync mode and parameter setting for each type of detector
Following table lists the integration time (example) at different sync modes for each prototype of detector,
when developing the DROC, you should set the integration time, please set this as the API demo’s example.
DROC also can set different time according to the actual need, we recommend that user can modify the
integration time in DROC with flexibility, and the integration time varies from different sync modes.
When you use DROC to execute offset calibration (3.1.36 chapter) or CarerayImageNDT to calibate, the
time was set according to the DetectorConf.xml (located in “conf” folder of SDK package), so the DROC set
time should be the same as this, otherwise the corrected image quality may be not good.
Recommend Value
Detector Valid Work Valid Sync SDK
Integration Delay Wait Calibration
Type Mode ID Mode ID Version
Time Time Time
EXT_SYNC stable 500ms 100ms 5ms √
CareView SOFT_SYNC stable 1000ms 100ms 5ms N/A
MODE_RAD
1800R MANUAL_SYNC stable 2500ms 100ms 5ms √
AED_SYNC testing 500ms 100ms 5ms ×
CareView MODE_RAD EXT_SYNC N/A N/A N/A N/A N/A
www.careray.com
76
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
www.careray.com
78
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Preview image.
(9) For External Sync Mode, call CR_query_prog_info() continuously to get current detector state in
time. When the detector is in READY state, hand switch can be pushed down to enable X-ray generation and
image acquisition. When detector state switching from READY to WAIT_PERMISSION, it indicates that the
detector has received the exposure request signal and is waiting for user’s exposure permission from PC. For
Automatic Sync Mode and Manual Sync Mode, when expose_flag acquired by calling CR_query_prog_info()
reaches 1, hand switch can be pressed to generate X-ray exposure. When expose_flag reaches 0, it indicates
(10) For External Sync Mode, call CR_permit_exposure() to permit X-ray exposure.
(11) Call CR_query_prog_info() to monitor detector’s state, if it returns the parameter "fetchable" as
TRUE, user can read out the image from the detector.
(12) Call CR_set_save_power() to set detector to low-power state after image fetchable flag turns TRUE.
(13) Call CR_get_image_attr() to obtain image related attributes, and call CR_get_image() to get the
image. If reading out image failed, call CR_get_image() for another time to read out the previous image.
You can also call CR_stop_acq_frame_cleanup() to stop acquiring image and clean up the image buffer of
detector.
Currently, CareRay detector firmware can set integration time according to the select sync mode
www.careray.com
79
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
CR_connect_detector()
CR_reset_detector(FALSE)
CR_set_check_mode(ModeID);
CR_set_sync_mode(SyncID);
CR_set_userCorrection(&corr)
CR_disconnect_detector()
www.careray.com
80
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
CR_start_acq_full_image()
EXT_SYNC
EXT_SYNC
==READY?
False
True
CR_rad_query_prog_info(&expProg) CR_rad_query_prog_info(&expProg)
CR_rad_query_prog_info(&expProgress)
Sleep(50)
Triggle HandSwitch If (expProg.exposable_flag==FALSE) If (expProg.exposable_flag==FALSE)
expProgress.expStatus == CR_set_indicator_color(RED) CR_set_indicator_color(RED)
CR_EXP_WAIT_PERMISSIONSecond Gear Else Else
False CR_set_indicator_color(GREEN) CR_set_indicator_color(GREEN)
True
CR_permit_exp()
expProgress.fetchable==TRUE expProgress.fetchable==TRUE
False False
CR_rad_query_prog_info(&expProgress)
Exposure In Progress True True
Sleep(50)
True
CR_set_save_power()
CR_get_image_attr(struct *FrameAttr);
//alloc space
CR_get_image();
//correct
turned off. One-shot calibration is turned off when the "oneKeyCalibration" property is set to 0 in
cfg.properties. Refer to 4.4.2 if "oneKeyCalibration" is set to 1. To do the image calibration, user should first
www.careray.com
81
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
to run the offset calibration procedure, then the gain calibration procedure.
Acquire a series of dark images (10~32 frames). Then generate the offset calibration files ( This will
be processed in API).
Acquire several Rad images at one dose point (The dose sets from low to high). The default setting
is using 5 dose points, and acquiring 3 Rad images per dose point. Then save the Rad images to
!
Calibrate detector at external or manual sync mode.
!
Do offset calibration before gain calibration.
Pay attention:
Recommend to calibrate detector after the power on last than 45 minutes to make sure the
See details in API demo. The following shows the image calibration flow:
www.careray.com
82
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Offset calibration
InitialDetector
CR_cal_offset
CR_query_prog_info(&prog)
Sleep(100)
No
TRUE == prog.calComplete
Yes
www.careray.com
83
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Gain calibration
InitialDetector
recvNum = 0
n = 0
No
Yes
n++
recvNum++
totalNum == recvNum ? Yes
linerNumPerDose == n ?
Portable detector ?
Yes CR_execute_portable_cal :
CR_execute_linear_cal
CR_query_prog_info(&prog)
Sleep(100)
No
TRUE == prog.calComplete
Yes
www.careray.com
84
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
walk through the otherwise time-consuming and tedious calibration process by acquiring only one RAD
The conventional calibration has to be done by either a system integrator or Careray before performing
one-shot calibration. Note that although the conventional calibration mentioned in both 4.4.1 and this section
is composed of offset and gain calibration, there is a slight difference between them when performing gain
calibration. Specifically, in the context of one-shot calibration, the gain calibration works on a fixed dose
Do not start offset calibrate until the temperature inside the detector becomes stable. It normally takes a
powered-on detector more than 45 minutes to stay in an idle / stand-by state before the temperature
stabilizes. During the course of offset calibration, API acquires a series of dark images (10~32 frames),
and then, generates the offset calibration files. After the offset calibration finishes, user can proceed
with the gain calibration. The workflow of the offset calibration is shown in Figure 12. Refer to API
User will be prompted to acquire several Rad images at a proper dose (once selected, it becomes
fixed) so that the mean grayscale value falls into the target range between 15,000 and 25,000 count.
All acquired Rad images will be saved in the specified directory, and API uses them, along with the
offset calibration files, to generate gain calibration and defect files. The workflow of the gain
calibration is shown below. Refer to API demo code for detailed information.
www.careray.com
85
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Gain Calibration
InitialDetector
recvNum = 0
n = 0
CR_check_img_for_factory_cal No
(image)
No
n++
recvNum++
Result == CR_NO_ERR Yes
linerNumPerDose == n ?
Yes
Portable detector ?
CR_execute_portable_cal :
CR_execute_linear_cal
CR_query_prog_info(&prog)
Sleep(100)
No
TRUE == prog.calComplete
Yes
www.careray.com
86
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
!
Calibrate a detector in external sync mode or manual sync mode.
!
Attention:
1)Do not calibrate until the temperature inside the detector becomes stable;
2)Maximize both SID and collimator’s FOV for best calibration effects when performing
! conventional calibration;
3)Recommend 70kV for gain calibration, although it can be tuned to suit the needs of a given
application.
Recommend starting offset calibration after the temperature inside the detector becomes stable.
It normally takes a powered-on detector more than 45 minutes to stay in an idle / stand-by state
Recommend calibrating a detector once every 3-6 months for better imaging performance.
One-shot calibration
Calibration files have been created after finishing up the conventional calibration process. Since the
spatial distribution of X-ray somehow contributes to the so-obtained gain file, a degraded SNR is
expected if this gain file is directly used in the field. One-shot calibration is developed to address this
issue. The workflow of the one-shot calibration is shown below. Refer to API demo code for detailed
information.
www.careray.com
87
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
InitialDetector
No
Yes Offset acquisition process
No
CR_check_img_for_factory_cal
Result == CR_NO_ERR
Yes
CR_execute_one_key_cal
CR_query_prog_info(&prog)
Sleep(100)
No
TRUE == prog.calComplete
Yes
One Key
Calibration finished
www.careray.com
88
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
!
Perform one-shot calibration in external sync mode or manual sync mode.
!
One-shot calibration cannot be performed unless the conventional calibration has been
completed beforehand.
Attention:
1)Do not calibrate until the temperature inside the detector becomes stable;
! 2)Use common SID and maximize collimator’s FOV for best calibration effects when
3)Recommend 70kV for one-shot calibration, although it can be tuned to suit the needs of a
given application.
CareRay dual-panel system solution contains one X-ray generator, tube, workstation with application
software, two detectors with different MAC address and IP address, one Gbps ethernet switchboard or two
ethernet network card instead, one sync box used to distribute control signals.
User can select different types of detectors to merge into a dual-panel DR system. The following figure is
www.careray.com
89
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Wire connection between control panel and sync box is an optional selection, and wire connection
between workstation and sync box is also an optional selection. In this system, sync box used to send
exposure request signal Exp_Req(GEN_SYNC_P) to XPFD1 and XPFD2, and send exposure enable signal
Exp_En(DET_SYNC_P) from one detector to X-ray generator and control it to generate X-ray. If the
workstation has only one Gbps ethernet card, user needs to add a Gbps switchboard. But it is not
recommended to use switchboard. When using switchboard, user should connect the network cable from the
two detectors to the switchboard, and connect the cable from workstation to the switchboard. We recommend
to use two Gbps ethernet cards, and connect the cables from the two detectors to these two cards, then set the
local IP address for the two cards, such as 192.168.68.100 and 192.168.68.101.
The default IP address of single detector is 192.168.68.1. If using dual-panel system, it needs to change
one detector’s IP address and MAC address. The operations are as following:
Step 1, confirm the IP address of workstation. Connect the detector which needs to change the IP address
and MAC address. Open the network connection page, and set local IP address as 192.168.68.100, and subnet
mask as 255.255.255.0.
Step 2, Login the detector management GUI. Open the IE browser window. Input the entrance address
Press the Enter key to confirm, then a login dialog will popup. Input user name as "power", password as
"power". click the login button, and enter the remote control home page after verification.
Step 3, Set the Network. Click the "ADVANCED" button, then click "Network" on the left. The
Change the last two data "95:01" of MAC address to other data. Modify the last data "1" of IP address to
"2", then click save button, then reboot button to reset detector. The configuration will take effect.
www.careray.com
91
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Pre-work
Modify Config.ini to
Connect dual panels to
Modify one detector’s enable
dual network cards PC
IP/MAC address “ipAddress1”item and set IP from them
www.careray.com
92
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
of detector are defined: Normal work temperature range, warning temperature range, standby temperature
range.
OVER_MAX_TEMP_LIMIT
55
45 IN_WARN_TEMP_LIMIT
IN_NORMAL_TEMP
5 IN_WARN_TEMP_LIMIT
-5
OVER_MIN_TEMP_LIMIT
In Warning temperature range, DROC use yellow font to show current temperature value.
Greater than upper warning temperature, DROC use red to show current temperature value, forbid
exposure at the same time; if users press handle, the detector will not respond
Less than lower warning temperature, DROC use red to show current temperature value, reminding
users to change environment temperature or wait detector warm-up. In this case, exposure request is
It is recommended to acquire temperature status at 5-10 seconds intervals in DROC software. When
detector’s inner temperature gained by temperature sensors is greater than upper standby temperature,
detector will enter standby mode and will not respond to exposure request until detector inner
Over-Running
Normal Temperature Warning Temperature Invalid Temperature
Temperature
www.careray.com
93
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
OVER_MAX_TEMP_LIMIT/
IN_NORMAL_TEMP IN_WARN_TEMP UNVALID_TEMP
OVER_MIN_TEMP_LIMIT
The system should ensure the detector’s work temperature range to be among 5-45 ℃, and the
Recommendation: application software should read the detector’s current temperature value in a
certain period, such as reading per 10sec, and set reasonable temperature warning flag
electricity of battery. The type of "relative_state_of_charge" is float. If this value is 0.63, which means the
quantity of electricity is 63%. The bit6 of the item "battery_status" means discharge or charge state. Zero
larger than 40%, display the battery state as green; while 40%-20%, display as yellow; and
bellow 20%, display as red; bellow 10%, display as red and draw cross.
www.careray.com
94
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
API will try to reconnect when the connection state between detector and PC was disconnected until the
connection established, and revert to the former status, the application needn’t to reconnect.
Detector will save the image which was not been transferred successfully due to the bad network quality.
If certain API returns error code 58, that means the transferred failed image exists in detector, user can decide
to if execute the resume process according to need (call CR_stop_acq_frame_cleanup() to cancel the resume
and the detector would delete the failed image inside), and see the resume process in API demo.
Following cases are related to image data resume transfer feature, and the developers should notice the
1. DROC queries the API to get the resume information to inform the user when DROC executes the normal
acquisition failed.
2. Every time open the software, after initializing the detector, if the detector has the resume image, API
notifies the DROC to inform the user to resume the image by callback function.
3. If user doesn’t close the software, and the API reconnects automatically, if the detector has the resume
image, API notifies the DROC to inform the user to resume the image by callback function.
www.careray.com
95
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Initialize
Unfinished image
exist ?
SetNormalPower
Y
StartGrab
QueryExpProgress
Fetchable == TRUE
exist ?
GetImage Y
Continue to get
Success ? N
image ?
Finished N
www.careray.com
96
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
The CareTouch 100 is an accessory compatible with 1500Cw series detectors. The glove is equipped with
two LEDs, which, depending on its inner state, emit red, yellow, or green light. As shown in figure below,
LED1 indicates whether the detector is in the AED mode (the detector switches to high energy consumption
mode when activating AED, and stays in low energy consumption mode otherwise), while LED2 suggests
The status of the CareTouch 100 can be monitored by checking the "connectToDetector" element within
the SHSStatus structure. This element takes a value ranging from 0 to 13 to enumerate 14 states as shown in
the table below. Figure 19 shows a set of 14 icons to indicate different states. DROC developers can readily
adopt and use these icons in the UI design, but they are also free to create their own icons.
CareTouch
index connect ? touch ? AED ? DT battery
battery
0 N - - - -
1 Y - - - -
2 Y Y N < 10% >= 10%
3 Y Y N < 10% < 10%
8 Y Y N >= 10% < 10%
10 Y Y N >= 10% >= 10%
11 Y Y Y - < 10%
13 Y Y Y - >= 10%
www.careray.com
97
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Figure 21 Different CareTouch 100 icons to indicate different states (refer to the original PDF file for colored
images).
4.9 FFAEC
AEC requires back-to-back exposures within a very narrow time window. The first exposure is conducted in
extremely low dose for preview purposes. The resulting image is obtained after 32-by-32 binning and its SNR has
been compensated for. The exposure settings are determined by the software based on the body tissue of the
current interest and the patient positioning. The second exposure is for normal exposure whose settings are
automatically optimized based on the previously obtained preview image without any user intervention. The dose
should be appropriate and practicable to minimize the exposure of body tissues while the image quality is still
sufficiently maintained.
API implements AEC by providing DROC with an interface that is based on a call-back mechanism. Once the
detector switches to a certain state, the registered callback function will be triggered so that DROC knows it is the
time to perform pre-defined actions as a proper response. Specifically, user needs to define an AEC call-back
function, say fcn, according to its prototype, and register it using CR_register_AEC_callback(fcn). Refer to
API_demo and subsection 4.4.3 for more details about detector and AEC initialization.
The single 750M image size is of 4096 * 3072, 24M, please notice that application should care the memory
www.careray.com
98
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
allocation and management, and API outputs images with 65536 bytes head in AEC flow.
Advice: If calibrate 750M detector failed because of memory allocation, you can use 4gb_patch add-in to
solve it (rebuild the exe file) for X64 Win7 OS, and the solution for 32 bit OS like follows:
1) Start -> Program -> attachment, right click the “Command prompt”, select “Run as administrator”
2) Input “bcdedit /set IncreaseUserVA 3072” (notice the backspace, no quotations), Enter
3) Restart the PC
Input “bcdedit /Deletevalue IncreaseUserVa”, Enter, then restart the PC if you want to recover the PC.
If user enabled the quros real time offset correction feature (Chapter 2.4.1), when initializing the detector
each time to launch the program, API will acquire the real time offset image automatically, and it cost about 30s,
in the time, the user’s acquisition operation will be responded till the real time offset image was acquired, after
that, user needn’t to wait. We recommend DROC can notify the user the condition.
www.careray.com
99
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
www.careray.com
100
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
DROC API
Connect detector
Call 2 APIs to initialize detector
CR_connect_detector(char* work_dir)
Reset detector
CR_reset_detector(false)
True
False
expProgress.expStatus
==READY?
True
False
expProgress.expStatus
==CR_EXP_EXPOSE?
True
True
Get preview image, calculate the best dose for the Trig callback, preview image arrived
second exposure according to the preview image (EVT_AEC_PREV_IMG_ARRIVE,Data)
End rad mode acquisition flow
Sleep(50)
False
expProgress.expStatus
==READY?
True
False
expProgress.expStatus
==CR_EXP_EXPOSE?
True
False
expProgress.fetchable
== TRUE ?
True
Get corrected rad image
CR_get_image()
Enter AEC flow
again
Trig callback, notify that rad image
Get rad image, post-process, display
arrived(EVT_AEC_RAD_IMG_ARRIVE,Data)
101
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
To prevent the detector from producing false-triggered images, do not hit or press the panel surface
abruptly. (False-triggered images are produced by a detector when it mistakenly detects an event of X-ray
When the detector produces a false-triggered image, it will take some time for it to switch back to "ready
During the course of image acquisition, the object should stay still. Make sure the detector remains in the
"ready for exposure" state before pressing the hand switch to emit X-ray.
Minimal dimensions of the exposure window are 12 cm (along scan direction) by 2 cm (along readout
direction).
Along the scan direction, the central 20 cm of the panel and the exposure window must have a minimal
12 cm overlap. Taking 1500Cw series detector as an example, the following figures show three different
To ensure the quality of the resulting RAD image, it is recommended to use a small exposure time (i.e.,
If the resulting RAD image still presents a visible band, possible causes include, but are not limited to,
the following:
The triggered line lays among the top 24 rows, or among the bottom 10 rows of the exposure
area;
The grayscale value of the pixels around the triggered line is at the noise level. These pixels do
not carry information about the object of the current interest, and therefore, the band cannot be
corrected;
The image does not present enough coherent information the algorithm could use to correct the
band effectively.
For detailed information, refer to the log file, or contact CareRay technical support professionals.
www.careray.com
102
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
(a)
(b)
(c)
www.careray.com
103
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
(a) AED will not work since the overlap is too short (6 cm);
5 Image correction
harddisk to memory and apply the correction processing for the images.
!
Only when the calbration files exist, the iamge correction can be normally executed.
"D:\CareRayCalImgs\CXXXXXX" folder. ("CXXXXXX" please see real detector ID) This calibration file
path defined by the item "base_dir" in "…\CareRay\conf\cfg.properties" file. The "CXXXXXX" folder
includes another three folders, named OffsetImage, GainImage and DefectImage, where the default calibration
After calling CR_set_user_correction(), API will load the default calibration files to do image
! correction.
www.careray.com
104
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Each image calibration procedure will generate new calibration files and covere the old files. If user
The "…\CareRay\conf\cfg.properties" file lists some calibration parameters. Using Notepad software
Enable the item "cal_type". Its default setting is disabled. Please delete # symbol to enable it..
After above operations, if setting "cal_type" equals to default, table, wall, filter-1, filter-2…, API
will generate such calibration files whose name includes the string “table” or others.
Only the image calibration of setting calibration type has been done, loading specified
User can add some lists in appication software. Fill in the items according to cal_type (default, table, wall,
filter-1, filter-2...) and transmit the parameter value using CR_select_cal_type() function.
If selecting one of these items, call CR_select_cal_type(char* name), and then call
For CareRay detectors, when user uses low density grid while acquiring a Rad image, it is necessary to
www.careray.com
105
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
Gain Gain
Correction Correction
Remove Grid-
Pattern
Bad pixel&lines
Correction
The bad pixels and bad lines removal algorithm integration flows when grid exists are as follows:
… …
CR_set_user_correction() CR_set_user_correction()
CR_start_acq_full_frame(); CR_start_acq_full_frame();
CR_get_image_attr(); CR_get_image_attr();
CR_get_image(); CR_get_image();
CR_inpaint_bad_pixels()
www.careray.com
106
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
When acquiring an image, user should remove the grid pattern at first, then call the API function to
inpaint bad pixels. Image enhancement and other work can be done by application software after that. Details
API has integrated the module of removing low density grid from API4.0.1 or late version. If user needs
Please see the configuration items about CareRay grid suppression in Chapter 2.4.1.
Size:15" * 18" or 18" *18". Grid with the size of 15"*18" can be used on 1500 series only.
Collimator size:13cm*13cm
The direction of X-ray should be parallel to the direction of Grid. If the image is too dim to detect, please
rotate 90°.
www.careray.com
107
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
If defected pixels and lines aren't removed before suppression, these defect area would be stretched. we
There are blind and low sensitivity areas in detector borders. Blind areas are invalid for image acquisition,
user application software should discard these areas. The thin scintillator forms low sensitivity areas where its
www.careray.com
108
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
performance is not so good as the middle areas of an image, user application software can do some pixel
The following diagram shows these two types of areas of a Rad image. Just for displaying clearly, the
L1, L2, R1, R2 are the scan directions of flat panel, named the Height direction; U1, U2, D1,
! D2 are the read out directions of flat panel, named the Width direction.
www.careray.com
109
Careray Digital Medical Technology Co., Ltd.
5F,Building B3, Biobay, 218 Xinghu Street, Suzhou,Jiangsu, China,215123
o+86 512 86860288 f+86 512 86860388
1500Rm 2 2 2 2 10 10 10 10
500M 0 0 0 0 4 4 0 0
750M 12 12 0 0 0 0 0 0
500P 0 0 0 0 3 3 0 0
1500S 6 6 6 6 0 0 0 0
750S 6 6 6 6 0 0 0 0
1800Le 2 2 2 2 0 0 0 0
1800Cwe 2 2 2 2 0 0 0 0
D4343 6 6 6 6 0 0 0 0
!
The detector’s performance is not influenced by the borders of an image.
Recommend user application software to cut off or add frame to the dummy areas, and cut off,
add frame, translucence, or gradually lower the pixel values for the low sensitivity areas.
Notice that the processing of borders is the last step of image acquisition flow. User shouldn’t
www.careray.com
110