DRTECH API Manual For EVS Detectors
DRTECH API Manual For EVS Detectors
Rev.46
Released By 2024-01-29
Table of Contents
ECali1 is a calibration and utility software for the X-ray detectors developed by DRTECH Inc.
ECali1 provides configuration of connection and related settings with the DRTECH detectors, as well as
the generation of Map files required for calibration.
You can set all of configurations using ECali1, and we strongly recommend using Ecali1. If you use
ECali1 with your software in hospital, you can minimize software programming for DRTECH API.
Installation file of ECali1 is included on MAP file CD-ROM provided with Detector.
* Please refer to ‘DRTECH Detector PC Setting Guide (ENG)’ for additional PC setting
EVS3643_SampleProgram
The simplest sample program for EVS 3643. You can apply this to every EVS detectors if
you change model type number in the source code.
DrtechConsole
Basic sample program of EVS detectors.
In this, you can refer using 2 or 3 detectors in one workstation.
EXTReam_SampleProgram
Sample program of Industrial EXT Models.
In this, you can refer specific functions like software triggering.
EXTReam_SampleProgram Guide.pdf in {SDK}\Manual folder.
CRMode_Image
Sample program for CR mode function, especially downloading CR images in detector.
CRMode_Order
Sample program for CR mode function, especially insert CR exam orders to detector.
DXConsole
Advanced sample program of EVS detectors and others.
In this, you can refer how to implement gain calibration in your software.
EVS3643_SampleProgram_CustomCmd
Custom CMD is a specific function to communicate with x-ray system.
Your software can send specific command (network packet) to DRTECH detector, and if
there are special communication model between DRTECH detector and your x-ray system,
then your system can get that specific command.
This function is very specific, so please contact to us if you want to use this function.
DRTECH API uses TCP/IP Windows socket. You must check and avoid conflicting IP addresses and
Server Ports.
Table. Used Port Number by Detector Model
DRTECH Detector Model Used Port Number
EVS / EXT / RSM Detectors 10250, 10254, 10258, 10262
FLAATZ 600 10240
Other FLAATZ Detectors 8000, 8001, 8002
** x86 DRTECH API can be run on x64 Windows. It depends on your application, not operating system.
If your software is 32bit (x86) program, then you should use x86 DRTECH API.
If you software is 64bit (x64) program, then you should use x64 DRTECH API.
* x86 for DRTECH API x86, and x64 for DRTECH API x64. This depends on DRTECH API package.
[List]
DRTECH_LAN.dll
Sub DLL [Description]
Followings are Sub DLL Files.
You don’t need to call them (DRTECH API calls them).
But it should be placed in the same folder with DRTECH API DLL.
[List]
RET.dll, TruviewART.dll, LicenseClient.dll
Dependency DLLs [Description]
They should be placed in the same folder with DRTECH API DLL.
DRTECH Corporation - 10 -
API SDK Manual for EVS Detectors Rev.46
Requirements
CPU Intel CPU with quad (4) cores or more.
RAM 8 GB or more
Storage HDD 500GB or more
(additional SSD 128GB is recommended)
LAN Card Gigabit Ethernet
OS Windows 7, 8, 8.1, 10, 11 32bit or 64bit
Warning! If the system has lower specification, then you may get abnormal images.
- Memory Usage
API uses PC memory about 300MB ~ 400MB when you use only one detector. (It is different by
Detector resolution and model type)
If you use two detectors with one PC, then API uses the memory about 500MB, and about 600MB for
three detectors.
Also, if you use DRTECH Fixed Grids (e.g. FG14, EFG17, and so on), then the API requires about
3~400MB memory more.
DRTECH Corporation - 11 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 12 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 13 -
API SDK Manual for EVS Detectors Rev.46
3.1.3. EVS 2430 Detectors (EVS 2430, EVS 2430W, EVS 2430G, EVS 2430GW)
One image frame has 22.5MB (3840 x 3072 x 2 Byte) data.
DRTECH Corporation - 14 -
API SDK Manual for EVS Detectors Rev.46
3.1.4. EXT 2430 Detectors (EXT 2430, EVS 2430G, EXT 2430G, EXT 2430H)
One image frame has 22.5MB (3840 x 3072 x 2 Byte) data.
DRTECH Corporation - 15 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 16 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 17 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 18 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 19 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 20 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 21 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 22 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 23 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 24 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 25 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 26 -
API SDK Manual for EVS Detectors Rev.46
- D1 Mode
EVS 4343 and EVS 2430 detectors support D1 mode.
This is a manual reference mode. You must call RequestDarkScan DLL function before taking an X-ray.
You can scan dark image before every X-ray taking, or do it once and take several x-rays.
We recommend do one dark scanning by one person (exam).
- D2 Mode (Default)
EVS detector does dark scanning after taking an x-ray automatically on D2 mode.
Exposure start Exposure end Image received Auto dark scanning Passing to your S/W
Automatic dark scanning is performed at every x-ray image taking. So, it takes 3 or 4 seconds more till
pass to your S/W.
DRTECH API provides ‘Preview’ image. As the D2 sequence before, the preview image is passed to you
before automatic dark scanning, and the passing timing is the same with D1 mode.
DRTECH Corporation - 27 -
API SDK Manual for EVS Detectors Rev.46
Smart Ready ON Need not call. DRTECH API ignores RequestDarkScan DLL function and
(Default) control internally when Smart Ready is ON.
- Smart Ready
To show (announce) READY / BUSY status of the detector peacefully, Smart Ready function is developed.
When you calling StartAcquisition and RequestDarkScan DLL functions in sequence, API announces
READY, BUSY, and READY signals in sequence. The first READY signal is useless, and it can confuse user.
If you use Smart Ready, API announces BUSY and READY signals in that situation. For that, API controls
dark scanning internally, so you don’t need to call RequestDarkScan DLL function when Smart Ready is
on. RequestDarkScan DLL function doesn’t work on Smart Ready.
You can also disable Smart Ready in DRTECH.ini file. SMART_READY in DRTECH.ini is the option for it, if
the value is 1, Smart Ready will be applied, and if the value is 0, Smart Ready will not be applied.
The default value is 1 (Enabled).
* Software triggering mode is not affect by Smart Ready. RequestDarkScan DLL function still works and
you should call RequestDarkScan manually. About triggering modes, please refer the next chapter.
* If you want to do manual dark scanning in other triggering modes, please use
DRTECH_RequestDarkOffsetCalibration DLL function.
DRTECH Corporation - 28 -
API SDK Manual for EVS Detectors Rev.46
* The EXT EXT1036BW, EXT1036B model does not support AED triggering.
User always has to choose one of above 4 triggering configurations.
USB Hand Switch Triggering uses DRTECH’s USB Hand Switch device. USB Hand Switch device connects
x-ray system and detector via host PC to synchronize x-ray timing.
AED means Auto Exposure Detection technology. DRTECH EVS detectors can detect x-ray itself without
any synchronization with x-ray system on AED Triggering.
Sync Triggering connects x-ray system and SSU to synchronize x-ray timing.
Software Triggering uses some DLL functions to scan. Only EXT detectors support this triggering mode.
For more information about exposure mode, please refer to EVS detector service manual.
DRTECH provides detector with AED Triggering mode as a default.
The initial exposure mode of DRTECH API can be changed in ECali1 Configurations.
You can change the exposure mode on program running using DLL function.
- Announcing scanning
DRTECH API announces scanning timing using IDC_SERIAL_MESSAGE (0x1007) call-back message.
This is worked normally on USB Hand Switch, and Sync Triggering. On AED Triggering with D1 image
mode, it is also worked normally.
In AED Triggering with D2 image mode, the call-back message is generated on not-exact timing. On
AED + D2 mode, the call-back message is generated when API receives preview image internally. This
can avoid abnormal AED Triggering below.
DRTECH Corporation - 29 -
API SDK Manual for EVS Detectors Rev.46
On AED Triggering with D1 image mode, IDC_SERIAL_MESSAGE call-back message is generated when
scanning, and if it was an abnormal AED, then API generates IDC_AED_ABORT (0x1021) call-back
message to announce abnormal AED to your S/W. So, you should check IDC_AED_ABORT call-back
message to determine the scanning is invalid.
On AED Triggering with D2 image mode, IDC_SERIAL_MESSAGE call-back message is generated when
API receives preview image data internally. It is after checking abnormal AED, so you don’t need to
check IDC_AED_ABORT.
Also, on USB Hand Switch and Sync Triggering, IDC_AED_ABORT is not generated. It is only for AED
Triggering.
To know exact usage, please refer A1. Call-back Messages (p. 56)
DRTECH detectors use dark reference image to determine abnormal AED triggering. If users shoot x-ray
while dark scanning, the next acquisition can fail and AED Abort can occur even x-ray is exposure. To
avoid this, DRTECH API runs dark scanning automatically after AED Abort.
DRTECH Corporation - 30 -
API SDK Manual for EVS Detectors Rev.46
Wireless detector is on sleep mode as default, and you can't take any x-ray image on sleep mode.
To take an x-ray image, you should awake the detector.
To control sleep mode, use two DLL functions - StartAcquisition(), EndAcquisition().
StartAcquisition() DLL function prepares detector to take an x-ray, and ends the sleep mode.
EndAcquisition() DLL function ends the acquisition mode, and enters to sleep mode.
Almost x-ray acquisition software separates worklist(orderlist, studylist) window and acquisition window.
Call StartAcquisition DLL function when you enter acquisition window, and call EndAcquisition DLL
function when you exit acquisition window.
DRTECH Corporation - 31 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 32 -
API SDK Manual for EVS Detectors Rev.46
You can set the time interval to start sleep / deep sleep using Ecali1 configuration.
There are two options.
DRTECH Corporation - 33 -
API SDK Manual for EVS Detectors Rev.46
Some detectors support HT (High Transfer) Mode. On HT Mode, the resolution of x-ray image of the
detector is reduced to half. For example, EVS 2430 (wired), has 3840 x 3072 pixel resolution. On EVS
2430 HT Mode, the resolution is reduced to 1920 x 1536.
HR (High Resolution) means full resolution mode (original mode). For example, EVS 2430 HR Mode has
3840 x 3072 pixel resolution.
HT mode will be useful for bad network environment, especially long-distance wireless network.
For HT map files, you shouldn't input its file path directly.
API loads HT map files automatically by given HR map file path.
The HT map file path will have '_HT' postfix from HR map file path.
You may set the defect and gain map file path by using LoadPixelMap, LoadGainMap DLL functions.
For flat-fielding map, you can use LoadPanelMap DLL function or Ecali1 configuration.
Just input the paths of HR map file, even you only use HT mode.
API saves the given map files, and adds '_HT' postfix automatically on HT mode.
DRTECH Corporation - 34 -
API SDK Manual for EVS Detectors Rev.46
If you use HR mode only, then uses HR map paths to load like following.
LoadPixelMap("EVS2430.MAP");
LoadGainMap("EVS2430.GMP");
LoadPanelMap("EVS2430.PMP");
* To load panel(flat-fielding) map (*.PMP), you can use Ecali1 Configuration alternatively. But the path
should be same.
If you use HR mode and HT mode together, then uses HR map paths to load like following.
LoadPixelMap("EVS2430.MAP");
LoadGainMap("EVS2430.GMP");
LoadPanelMap("EVS2430.PMP");
DRTECH Corporation - 35 -
API SDK Manual for EVS Detectors Rev.46
If you don't have HR map files and only have HT map files, then the HT map files should have "_HT"
postfix, and you should give the paths without "_HT" postfix.
For example, if you just have HT map files like ABCDEF_HT.MAP, ABCDEF_HT.GMP, ABCDEF_HT.PMP, then
you should call our DLL functions like following to load on HT mode.
LoadPixelMap("ABCDEF.MAP");
LoadGainMap("ABCDEF.GMP");
LoadPanelMap("ABCDEF.PMP");
DRTECH Corporation - 36 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 37 -
API SDK Manual for EVS Detectors Rev.46
You will use DRTECH API in two ways. First, you will use DLL functions to get image data, and so on.
Second, you will get status of the SELECTED detector by call-back messages in real-time.
4.1. DrtechConsole
DrtechConsole is a simple dialog-based MFC program for using DRTECH API.
Before using DrtechConsole, please install ECali1, complete initial settings, and take a shot for test.
Figure 3. DrtechConsole
DRTECH Corporation - 38 -
API SDK Manual for EVS Detectors Rev.46
To get X-ray image from the detector, use this software as follow sequence:
① Run DrtechConsole
② Connect EVS detector and check to success ping test.
Be careful! If you didn't set using Ecali1, the detector won't be connected.
DRTECH Corporation - 39 -
API SDK Manual for EVS Detectors Rev.46
* In this chapter, we describe only essential functions. For more utility functions, please DRTECH API
Reference.pdf
DRTECH Corporation - 40 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 41 -
API SDK Manual for EVS Detectors Rev.46
* LoadPanelMap
This DLL function loads panel calibration map file (*.PMP or *.APMP) from DRTECH.
If you do initial setting using ECali1 software, you can skip calling this function. File path of panel map
file will be shared from ECali1 configuration to other software that using DRTECH API, in same account
of Windows. (If you use multiple Windows accounts, the configuration will not be shared, if then, you’d
better to call LoadPanelMap function on your software)
SampleProgram skips calling this function. It assumes using ECali1.
* LoadFilter
You should call this function if you use DRTECH’s fixed grid (e.g. EFG17…). You should load suitable
filter file, and the filter file is included in ‘{ECali1}\Filter’ folder. Please refer DRTECH API Reference.pdf
manual to find suitable filter file..
* We recommend running ‘Initialize Process’ when your software starts, and ‘Finalize Process’ when your
software ends. If you want to do re-initialization while your software running, please refer DRTECH API
Reference.pdf manual.
DRTECH Corporation - 42 -
API SDK Manual for EVS Detectors Rev.46
CDrtechConsoleDlg::OnBnClickedInitialize
DrtechInitialize
SelectPanel (DLL Function): for the first detector initialization.
InitializeOneDetector
InitializeDetector (DLL Function)
LoadPixelMap (DLL Function)
LoadGainMap (DLL Function)
LoadFilter (DLL Function)
DrtechConsole always initialize two detectors. In real environment, you should initialize detectors by the
actual count of detectors. More detector initialization needs more memory usage. If you use just one
detector, the DRTECH API uses about 300MB memory, and uses 150MB memory per one additional
detector. If you use DRTECH Grid Solution, 300MB memory will be needed additionally..
DRTECH Corporation - 43 -
API SDK Manual for EVS Detectors Rev.46
4.2.2.1. DrtechInitialize
DRTECH Corporation - 44 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 45 -
API SDK Manual for EVS Detectors Rev.46
4.2.2.2. InitializeOneDetector
DRTECH Corporation - 46 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 47 -
API SDK Manual for EVS Detectors Rev.46
CDrtechConsoleDlg::OnBnClickedButtonSelect0
SelectPanel (DLL Function): Select detector to take an x-ray.
CDrtechConsoleDlg::OnBnClickedButtonSelect1
SelectPanel (DLL Function): Select detector to take an x-ray.
CDrtechConsoleDlg::OnBnClickedButtonSelect2
SelectPanel (DLL Function): Select detector to take an x-ray.
CDrtechConsoleDlg::OnBnClickedButtonDarkScan
RequestDarkScan (DLL Function): Scan dark (offset) image and save.
DRTECH Corporation - 48 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 49 -
API SDK Manual for EVS Detectors Rev.46
4.2.3.2. CallbackMessageProcess
DRTECH Corporation - 50 -
API SDK Manual for EVS Detectors Rev.46
- IDC_READY_STATUS
Detector announces two statuses. You can know the status by type-casting “pMsg” to integer (int).
① BUSY
Integer value 0 (zero)
Detector works itself.
In general, detector is BUSY when:
During cycle time after taking an X-ray.
When the detector and x-ray generator finished synchronizing timing to take an x-ray.
② READY
Integer value 1
Detector can operate your command.
Call DLL functions when detector is READY.
DRTECH Corporation - 51 -
API SDK Manual for EVS Detectors Rev.46
- IDC_XCF_RECEIVED
You will receive this when API completes to provide x-ray image data.
Call GetImageBuffer DLL function to get x-ray image data buffer pointer when you received this
message.
Following is the structure of sub information of IDC_XCF_RECEIVED. There are many variables, but you
may need just ImageWidth and ImageHeight.
For usage, please refer DrtechConsole SampleProgram. You can find to search 'IDC_XCF_RECEIVED'
keyword.
DRTECH Corporation - 52 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 53 -
API SDK Manual for EVS Detectors Rev.46
4.2.3.4. OnBnClickedButtonDarkScan
DRTECH Corporation - 54 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 55 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 56 -
API SDK Manual for EVS Detectors Rev.46
1. int nBatteryValue
-1: Detector is not connected.
0~100: Battery rate(%). discharging.
500: No battery. Charging cable is
connected.
1000~1100: Wired Charging. Minus
1000 to get battery rate(%).
2000~2100: Wireless Charging.
Minus 2000 to get battery rate(%).
2. int nPanelIndex
Panel index of the information
3. int nBatteryTemperature
Celcius degree temperature of
battery
IDC_NETWORK_TYPE 0x1015 YES (Integer) 0: wired
1: wireless
IDC_SIGNAL_QUALITY 0x1017 YES (Integer) -1: Disconnection
DRTECH Corporation - 57 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 58 -
API SDK Manual for EVS Detectors Rev.46
Struct UnsentDownload
{
int nDownloadCount;
int nTotalCount;
}
struct UninitializedModelType
{
int nModelType;
char szSN[17];
};
DRTECH Corporation - 59 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 60 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 61 -
API SDK Manual for EVS Detectors Rev.46
Warning Detector
Default Description Text
Code Type
1 ALL The selected detector enters SLEEP MODE automatically within 30 seconds.
The connected detector has unregistered Serial Number. Please run ECali1
2 ALL
and register its serial number.
SSU is not connected or the connected SSU doesn't support Sync. Trigger
3 EVS
mode.
Detector is under preparing to scan. This takes about one minutes. Please
4 RSM
wait.
5 EVS The selected detector enters SLEEP MODE automatically within 5 minutes.
This warning code doesn't have default description text.
6 ALL The auto-sleeping time is reset. This call-back message will be generated if
you receive Warning Code 1 or 5.
Uninitialized detector model type is connected! Please set correct model
7 ALL
type.
Cannot find eBUS module! Please check the network connection and restart
8 RSM
the system.
Detector is on AGING MODE. Please wait till the mode ends. You can take
9 RSM
x-rays now, but you may get low-quality images.
10 RSM AGING MODE ENDS. You can take x-rays now!
11 EVS Request Dark Scan needs acquisition mode or unselected status.
12 EVS Changing to ACQ Type needs READY status.
13 EVS You can't request register in deep sleep mode!
14 EVS You can't take an x-ray if the detector is on CRADLE recharger.
15 EVS There are too many UNSENT images! Please delete them first.
DRTECH Corporation - 62 -
API SDK Manual for EVS Detectors Rev.46
When you have some troubles, please contact to DRTECH CS TEAM with following data.
If you can set remote support environment, then please tell us the time and the remote support
information. You can set the environment by connecting internet and install remote support software
like TeamViewer.
DRTECH Corporation - 63 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 64 -
API SDK Manual for EVS Detectors Rev.46
2. CR Mode setting
◎ ECali1 (Engineer mode) Setting
If you want to use CR (Portable) mode, you should enable and change setting by using Ecali1.
① Run ECali1.
② Go to Option → Configuration → Detector.
DRTECH Corporation - 65 -
API SDK Manual for EVS Detectors Rev.46
3. Switch to CR mode
1) DLL Function
Call RequestChangeSSID DLL function with parameter ‘3’ to switch to CR mode.
2) AP button
Press and hold AP button for 3 seconds to switch to CR mode.
DRTECH Corporation - 66 -
API SDK Manual for EVS Detectors Rev.46
Figure 9. CRMode_Order
① Initialize detector.
② CR order list window.
③ Change the order of CR orders.
④ Add a new CR order.
⑤ Delete the selected CR order at ②,
⑥ Clear CR order list.
⑦ Load CR order list in detector.
⑧ Save CR order list to detector.
(Caution! Pressing this button overwrites the CR order list stored in detector with the contents of ②)
⑨ Set detector to CR mode.
DRTECH Corporation - 67 -
API SDK Manual for EVS Detectors Rev.46
DRTECH Corporation - 68 -
API SDK Manual for EVS Detectors Rev.46
2) CRMode_Image
CRMode_Image provides the ability to show images in detector, download to a PC, or delete.
You can use this function for downloading unsent images and CR mode images.
DRTECH Corporation - 69 -
API SDK Manual for EVS Detectors Rev.46
5. CR Mode Usage
There are two usages: With pre-inputted order and emergency.
2) Emergency
① Change the detector to CR (Portable) Mode.
Using AP button on the detector, or API DLL function.
② Take detector only.
③ Take x-rays. Please check that the Ready lamp on the detector is green.
The images will be stored in the detector.
④ Connect the detector to PC, and you can download the images from the detector using API
DLL function.
DRTECH Corporation - 70 -
API SDK Manual for EVS Detectors Rev.46
DRTECH API provides function that is called 'software shot (trigger)', and you can take an x-ray image
without x-ray source (generator). You can use this just configure DRTECH configuration file (DRTECH.ini)
with keyboard shortcut.
To do this, you should connect the detector. If you don't have any DRTECH detector, you can't do this.
DRTECH Corporation - 71 -
API SDK Manual for EVS Detectors Rev.46
7) You can take an image via input 'Ctrl+5' after StartAcquisition, when the detector is READY.
DRTECH Corporation - 72 -
API SDK Manual for EVS Detectors Rev.46
DRTECH API supports software trigger only on USB Hand Switch exposure type.
(You can’t use this with AED or Sync. Trigger exposure type)
To take an x-ray image with software trigger, use following DLL functions:
These functions just try to send signals to detector, and you should use call-back messages to check
good working. The return value 1 doesn’t guarantee good working.
Software trigger works with following sequence. Please see next page.
DRTECH Corporation - 73 -
API SDK Manual for EVS Detectors Rev.46
If you skip calling SetReadyCancelSerial(), then you can’t do software trigger more.
DRTECH Corporation - 74 -