0% found this document useful (0 votes)
290 views74 pages

DRTECH API Manual For EVS Detectors

Uploaded by

iasaelectronica
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
290 views74 pages

DRTECH API Manual For EVS Detectors

Uploaded by

iasaelectronica
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 74

DRT-MAN-API

Rev.46
Released By 2024-01-29

Digital Radiography Technologies

DRTECH API SDK Manual


EVS 4343, EVS 4343G
EVS 3643, EVS 3643G
EVS 2430, EVS 2430G
EVS 2430W, EVS 2430GW, EVS 2430We
EXT 2430, EXT 2430G
EXT 2430H, EXT 1024S
EXT 1824G, EXT 3643S, EXT 2143S
EXT 1036BW, EXT 1036B
EXT 1024C, EXT1024B, EXT 1043B
EXT 3643U, EXT 3643UH, EXT 2430U
EXT 2430UH, EXT 4357U, EXT 4357UH
API SDK Manual for EVS Detectors Rev.46

Table of Contents

1. Preparation: ECali1 Installation and Detector Connection. ........................................................................................... 3


1.1. Detector Connection Setting. ........................................................................................................................................ 3
1.2. Run ECali1 and Set Initial Configuration (Important) ......................................................................................... 3
1.3. Related Contents ................................................................................................................................................................. 4
2. DRTECH API Overview ................................................................................................................................................................... 6
2.1 Development Environment .............................................................................................................................................. 7
2.2. API Module ............................................................................................................................................................................ 8
2.3. Sub DLLs and Dependency DLLs ................................................................................................................................. 9
2.4. System Requirements ..................................................................................................................................................... 11
3. Important Features of EVS/EXT Detector ........................................................................................................................... 12
3.1. Image Format..................................................................................................................................................................... 12
3.2. Two Configurations for Dark Reference (Offset) Image.................................................................................. 27
3.3. Exposure Mode: 4 Different Triggering Configurations .................................................................................. 29
3.4. Power Management ........................................................................................................................................................ 31
3.5. HT Mode (Optional Function) .................................................................................................................................... 34
3.6. Image resending ............................................................................................................................................................... 37
4. DrtechConsole and Essentials of DRTECH API ................................................................................................................ 38
4.1. DrtechConsole ................................................................................................................................................................... 38
4.2. Essential DLL Functions ................................................................................................................................................. 40
Appendix A. API Reference Document ..................................................................................................................................... 56
A1. Call-back Messages ......................................................................................................................................................... 56
Appendix B. Trouble Shooting ..................................................................................................................................................... 63
Appendix C. CR (Portable) Mode Function (Optional Function) .................................................................................. 65
Appendix D. Take an x-ray image without x-ray source .................................................................................................. 71

DRTECH Corporation -2-


API SDK Manual for EVS Detectors Rev.46

1. Preparation: ECali1 Installation and Detector Connection.


Before introducing DRTECH API, this chapter explains how to connect detector and how to use ECali1.

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.

1.1. Detector Connection Setting.


Detector and DRTECH API communicate using TCP/IP protocol via Gigabit Ethernet.
After you connect all of physical cables, set follows:
① Set IPv4 Address of Ethernet Network Adapter (connected to detector) in PC
A. IP Address: “192.168.250.100”
B. Subnet Mask: “255.255.255.0”
C. Delete address on DNS server setting.
② Do ping test to detector
A. Initial IP Address of the detector is “192.168.250.135”
B. Type “ping 192.168.250.135” on command prompt.
The Ethernet connection is established when the ping test succeeds
You can refer more details from EVS Detector Service Manual or Chapter 3.4 of ECali1 Manual.

* Please refer to ‘DRTECH Detector PC Setting Guide (ENG)’ for additional PC setting

1.2. Run ECali1 and Set Initial Configuration (Important)


To communicate with EVS detectors, user always has to register serial number of the detector.
Each EVS detector has a unique serial number, and DRTECH API identifies each detector by its unique
serial number. You can use one, two or three EVS detectors on one PC. You must register the serial
number that you want to use the first / second / third detector on ECali1.

For ECali1 installation, please refer to Chapter 3 of ECali1 Manual.


For EVS Detector initial setting, please refer to Appendix B of ECali1 Manual.

DRTECH Corporation -3-


API SDK Manual for EVS Detectors Rev.46

1.3. Related Contents

You can refer following manuals in {SDK}\Manual folder.

 DRTECH Detector PC Setting Guide (ENG).pdf


 How to set PC Windows configurations to use DRTECH detectors.

 DRTECH API Reference.pdf


 Descriptions of DRTECH detector model types and DLL functions.

 DRTECH SDK Gain Calibration.pdf


 To implement gain calibration in your software.

 DRTECH API Manual When Not Using ECali1.pdf


 If you don’t want to use ECali1, then you should develop or set some features in this
document.
 DRTECH.ini (DRTECH API initial setting) configurations are described.

DRTECH Corporation -4-


API SDK Manual for EVS Detectors Rev.46

You also can refer following sample programs in {SDK}\SampleProgramSourceCode folder.

 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 Corporation -5-


API SDK Manual for EVS Detectors Rev.46

2. DRTECH API Overview


DRTECH API is DLL (Dynamic Link Library) software, communicates with firmware in DRTECH x-ray
detector using socket programming. DRTECH API is a server program, and firmware in detector is a
client program. (But, API is a client for some old DRTECH detectors.)

Table. Server / Client by Detector Model


DRTECH Detector Model API Detector
RSM Detectors
EVS / EXT Detectors Server Client
FLAATZ 600
Other FLAATZ Detectors Client *Server
* Actual server is control box (bridge device between PC and Detectors) in case of other FLAATZ
detectors.

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

Table. Used IP Address by Detector Model


DRTECH Detector Model Devices Used IP Address
Common PC 192.168.250.100
Router 192.168.250.98
EVS Detectors Detectors 192.168.250.135-137
SSU 192.168.250.101
EXT Detectors Detectors 192.168.250.135
RSM Detectors Detectors 192.168.250.130
FLAATZ 600 Detectors 192.168.250.150-152
Other FLAATZ Ethernet Control Box 192.168.250.200
Detectors Detectors NONE

DRTECH Corporation -6-


API SDK Manual for EVS Detectors Rev.46

2.1 Development Environment


DRTECH API has a Windows 32bit / 64bit DLL programs, and their packages are different.
We offer 32bit (x86) package by default, so if you want 64bit (x64) API, please contact us.

** 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.

Programming features are followed:

Table. Programming Features


Programming Language C++
OS Supported Windows software
DLL Function Interface stdcall
32 / 64bit software 32 / 64bit software
Character Set Multi-byte
Use of MFC Use MFC in a Shared DLL
Use of ATL Not Using ATL
Etc. Use Windows Messages
Use OpenMP parallel computing
Recommended IDE Microsoft Visual Studio 2008 or later
Required Additional Package* *Visual C++ 2008 SP1 Redistributable Package x86 or x64
FTDIChip CDM Drivers (For USB Hand Switch)

* x86 for DRTECH API x86, and x64 for DRTECH API x64. This depends on DRTECH API package.

DRTECH Corporation -7-


API SDK Manual for EVS Detectors Rev.46

2.2. API Module


DRTECH API has 2 modules - System Module and Functional module.

Table. API Modules


System Module Functional module
Set system environment for using DRTECH Functional module provides various
API. You must call system DLL functions as functions like getting image data, checking
a specific order. detector status, and so on. You can call DLL
functions when you want to get
information.

DRTECH Corporation -8-


API SDK Manual for EVS Detectors Rev.46

2.3. Sub DLLs and Dependency DLLs

Table. Sub DLLs and Dependency DLLs


DLL Category Description & List
DRTECH API DLL [Description]
The only DLL file you should call.

[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.

[x86 Dependency DLL File List]


libcurl.dll, libimalloc.dll, libiomp5md.dll, libiompstubs5md.dll, libmmd.dll,
LicenseClient.dll, mkl_avx.dll, mkl_avx2.dll, mkl_blacs.dll,
mkl_blacs_intelmpi.dll, mkl_blacs_mpich2.dll, mkl_cdft_core.dll, mkl_core.dll,
mkl_intel_thread.dll, mkl_p4.dll, mkl_p4m.dll, mkl_p4m3.dll, mkl_p4p.dll,
mkl_pgi_thread.dll, mkl_rt.dll, mkl_scalapack_core.dll, mkl_sequential.dll,
mkl_vml_avx.dll, mkl_vml_avx2.dll, mkl_vml_cmpt.dll, mkl_vml_ia.dll,
mkl_vml_p4.dll, mkl_vml_p4m.dll, mkl_vml_p4m2.dll, mkl_vml_p4m3.dll,
mkl_vml_p4p.dll, svml_dispmd.dll,
ippcore-7.0.dll, ippi-7.0.dll, ippig9-7.0.dll, ippip8-7.0.dll, ippis8-7.0.dll,
ippiv8-7.0.dll, ippiw7-7.0.dll

[x64 Dependency DLL File List]


libcurl.dll, libimalloc.dll, libiomp5md.dll, libmmd.dll, LicenseClient.dll,
mkl_avx.dll, mkl_blacs_ilp64.dll, mkl_blacs_intelmpi_ilp64.dll,

DRTECH Corporation -9-


API SDK Manual for EVS Detectors Rev.46

mkl_blacs_intelmpi_lp64.dll, mkl_blacs_lp64.dll, mkl_blacs_mpich2_ilp64.dll,


mkl_blacs_mpich2_lp64.dll, mkl_blacs_msmpi_ilp64.dll,
mkl_blacs_msmpi_lp64.dll, mkl_cdft_core.dll, mkl_core.dll, mkl_def.dll,
mkl_intel_thread.dll, mkl_mc.dll, mkl_mc3.dll, mkl_p4n.dll,
mkl_pgi_thread.dll, mkl_rt.dll, mkl_scalapack_ilp64.dll,
mkl_scalapack_lp64.dll, mkl_sequential.dll, mkl_vml_avx.dll, mkl_vml_def.dll,
mkl_vml_mc.dll, mkl_vml_mc2.dll, mkl_vml_mc3.dll, mkl_vml_p4n.dll,
svml_dispmd.dll,
ippcore-7.0.dll, ippi-7.0.dll, ippie9-7.0.dll, ippim7-7.0.dll, ippin8-7.0.dll,
ippiu8-7.0.dll, ippiy8-7.0.dll

DRTECH Corporation - 10 -
API SDK Manual for EVS Detectors Rev.46

2.4. System Requirements


EVS/EXT detectors have following system requirements.

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

3. Important Features of EVS/EXT Detector

3.1. Image Format


DRTECH API gives x-ray image data as 1-dimensional array of unsigned short integer data type (2
Bytes). Each array element has one pixel gray value, and the order of the array matches to x-ray image
like following.

3.1.1. EVS 4343 Detectors (EVS 4343 and EVS 4343G)


One image frame has 18MB (3072 x 3072 x 2 Byte) data.

DRTECH Corporation - 12 -
API SDK Manual for EVS Detectors Rev.46

3.1.2. EVS 3643 Detectors (EVS 3643 and EVS 3643G)


One image frame has 15MB (2560 x 3072 x 2 Byte) data.

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

3.1.5. EXT 1024S


One image frame has 7.5MB (1280 x 3072 x 2 Byte) data.

DRTECH Corporation - 16 -
API SDK Manual for EVS Detectors Rev.46

3.1.6. EXT 1824G


One image frame has 13.5MB (3072 x 2304 x 2 Byte) data.

DRTECH Corporation - 17 -
API SDK Manual for EVS Detectors Rev.46

3.1.7. EXT 3643S


One image frame has 15MB (2560 x 3072 x 2 Byte) data.

DRTECH Corporation - 18 -
API SDK Manual for EVS Detectors Rev.46

3.1.8. EXT 2143S


One image frame has 9MB (1536 x 3072 x 2 Byte) data.

DRTECH Corporation - 19 -
API SDK Manual for EVS Detectors Rev.46

3.1.9. EXT 1036B


One image frame has 3.375MB (768 x 2304 x 2 Byte) data.

DRTECH Corporation - 20 -
API SDK Manual for EVS Detectors Rev.46

3.1.10. EXT 1036BW


One image frame has 3.375MB (768 x 2304 x 2 Byte) data.

DRTECH Corporation - 21 -
API SDK Manual for EVS Detectors Rev.46

3.1.11. EXT 1024B


One image frame has 4.927MB (1024 x 2406 x 2 Byte) data.

DRTECH Corporation - 22 -
API SDK Manual for EVS Detectors Rev.46

3.1.12. EXT 1043B


One image frame has 8.806MB (1024 x 4300 x 2 Byte) data.

DRTECH Corporation - 23 -
API SDK Manual for EVS Detectors Rev.46

3.1.13. EXT 3643U/UH


One image frame has 30.389MB (3532 x 4302 x 2 Byte) data.

DRTECH Corporation - 24 -
API SDK Manual for EVS Detectors Rev.46

3.1.14. EXT 2430U/UH


One image frame has 23.592MB (3830 x 3072 x 2 Byte) data.

DRTECH Corporation - 25 -
API SDK Manual for EVS Detectors Rev.46

3.1.15. EXT 4357U/UH


One image frame has 25.165MB (4096 x 3072 x 2 Byte) data.

DRTECH Corporation - 26 -
API SDK Manual for EVS Detectors Rev.46

3.2. Two Configurations for Dark Reference (Offset) Image.


Dark reference (Electronic offset) Image is the scanned image without x-ray exposure.
EVS detector provides two configurations about dark image scanning - D1 and D2.
DRTECH API always set this by configuration of ECali1, as initial value when started.
You can change after initial setting using DLL function, but we don’t recommend changing on run-time.

- 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).

Following is the sequence of taking one x-ray on D1 mode.


Exposure start Exposure end Image received Passing to your S/W

- 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

(Passing Preview Image)

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.

The preview image uses previous dark image.


You should call RequestDarkScan DLL function once at the first time.

DRTECH Corporation - 27 -
API SDK Manual for EVS Detectors Rev.46

About calling RequestDarkScan DLL function, please refer next table.

Table 1. Calling RequestDarkScan DLL Function


Mode Calling RequestDarkScan DLL Function
Smart Ready OFF Call RequestDarkScan DLL function after calling StartAcuqisition DLL
function in sequence.

Smart Ready ON Need not call. DRTECH API ignores RequestDarkScan DLL function and
(Default) control internally when Smart Ready is ON.

- Comparison of D1 and D2 mode.


Commonly, D1 mode acquires x-ray image faster than D2 mode, but D2 mode image quality is better
than D1. Please refer the detector specifications for details.

- 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

3.3. Exposure Mode: 4 Different Triggering Configurations


EVS detector provides 3 different triggering configurations to take an X-ray.

① USB Hand Switch Triggering


② AED Triggering (default)
③ Sync. Triggering (EXT detectors are not supported)
④ Software Triggering (only for EXT detectors, EXT1036BW, EXT1036B, EXT1024B, EXT1043B
default)

* 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

- Abnormal AED Triggering (AED Abort)


Sometimes, shock or squash to detector can run AED. Unfortunately, EVS detectors can check it after
scanning.

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

3.4. Power Management

3.4.1. Overview of Power management


Wireless detector has a battery, so it has power management (sleep mode) to increase operation time.

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

3.4.2. Sleep and Deep Sleep Mode


Wireless detector has two sleep modes - sleep and deep sleep.

About sleep mode control sequence, please refer followed figure.

Figure 1. Power management control sequence

The followed table describes differences of two sleep modes.

Table 2. Sleep mode differences


Category Sleep Mode Deep Sleep Mode
Power saving Weak Strong
Awakening time 1~2 seconds More than 10 seconds
Dark Scanning On acquisition mode, DRTECH API do dark scanning automatically
when awaked from deep sleep mode.

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.

1) Acquisition sleeping time (minutes)


What minutes to sleep mode on acquisition for selected detector automatically.
If you keep acquisition mode (after calling StartAcuiqision DLL function) without keyboard / mouse
input for the value of this configuration, the selected detector goes to sleep mode.
The default value is 5 minutes.
It is valid only on acquisition mode, for selected detector.

2) Deep sleep time (minutes)


Minutes to deep sleep mode for every detector.
If you keep sleep mode without keyboard / mouse input for the value of this configuration, every
detector goes to deep sleep mode.
The default value is 3 minutes.

If you set these values as 0, it means OFF.

DRTECH Corporation - 33 -
API SDK Manual for EVS Detectors Rev.46

3.5. HT Mode (Optional Function)


* Some EVS 2430 detectors support this configuration.

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.

3.5.1. HR and HT Mode Setting


You can set default value of HR / HT mode on Ecali1 Configuration.
You can also change HR / HT mode using DLL functions, but this can't affect to default value.
For example, if HR mode is default, change to HT mode by DLL function, and it will be set
automatically to HR mode after restarting S/W.

3.5.2. Map File Path (Important)


You should set our defect (pixel) map (*.AMAP or MAP), gain map (*.AGMP or GMP), flat-fielding map
(*.APMP or PMP) path by using DLL functions and Ecali1 configuration.

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

Let's take an example.


There are EVS2430.MAP, EVS2430.GMP, EVS2430.PMP files for HR mode.
EVS2430_HT.MAP, EVS2430_HT.GMP, EVS2430_HT.PMP files for HT mode.
6 files should be in the same folder.

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");

These are the same exactly with previous case.


If you change to HT mode, then API loads EVS2430_HT.MAP, EVS2430_HT.GMP, EVS2430_HT.PMP files
automatically.

If you use HT mode only, also use HR map paths, too.

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

3.6. Image resending


When the wireless detector is disconnected while image transfer, detector saves the image as file
itself. You can get the saved image when the detector is connected again.

1) If you called StartAcquisition DLL function when the detector is re-connected


Detector sends the image file directly, and API sends IDC_XCF_RECEIVED (0x1008) call-back message.

2) If you called EndAcquisition DLL function when the detector is re-connected


Detector didn’t send the image, API sends IDC_UNSENT_IMG_EXIST (0x110C). Then, you should
download the image via CRMode Image Donwloading function. About this, please refer
CRMode_Image of Appendix and sample program.

DRTECH Corporation - 37 -
API SDK Manual for EVS Detectors Rev.46

4. DrtechConsole and Essentials of DRTECH API


In this chapter, we will introduce essential DLL functions and sample program for using them.

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.

Figure 2. DRTECH API Interface

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.

③ Click (Initialize) button.


④ Click (Select Detector (0)) button.
⑤ Click (StartAcquisition) button.
⑥ If the detector is connected and everything is OK, “[USE] Detector is READY” message will be
appeared on the log edit box.

Figure 4. Detector is READY on DrtechConsole

⑦ Click (Dark Scan) Button.


⑧ Wait till Detector is Ready again.
⑨ Take a shot with the connected detector.
For this, you should complete to set other accessories like USB Hand Switch.
⑩ DrtechConsole will save the received image data as “Latest Image.IMG” on the same folder.
⑪ Click (Finalize) to exit program.

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

4.2. Essential DLL Functions


Refer to “DrtechDefinitions.h” header file in DrtechConsole sample program.
Essential DLL functions to get x-ray image are followed.

* In this chapter, we describe only essential functions. For more utility functions, please DRTECH API
Reference.pdf

Table 3. Essential DLL Functions


Module DLL Function Brief description
Name
System InitializeDetector Initialize API
LoadPixelMap Load DRTECH Pixel Map File
LoadGainMap Load DRTECH Gain Map File
LoadFilter Load DRTECH Grid Filter File
SetCallback Set your Call-back function to get / process status information
SelectPanel Select detector to acquire x-ray image.
FinalizeDetector Finalize API
Function RequestDarkScan Request to scan dark (Offset) image
GetImageBuffer Get X-ray image data buffer pointer.

DRTECH Corporation - 40 -
API SDK Manual for EVS Detectors Rev.46

4.2.1. DLL Function Calling Sequence


Refer to DrtechConsole sample program UI and its source code.
To initialize and finalize DRTECH API, you must call system module DLL functions in the following order.

Figure 6. DLL Function Calling Sequence

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

4.2.2. Sample Codes for Initialization


//This sample program is written for EVS 4343 and EVS 3643 Dual.
In DrtechConsole, function structure for initialization is followed:

 CDrtechConsoleDlg::OnBnClickedInitialize
 DrtechInitialize
 SelectPanel (DLL Function): for the first detector initialization.
 InitializeOneDetector
 InitializeDetector (DLL Function)
 LoadPixelMap (DLL Function)
 LoadGainMap (DLL Function)
 LoadFilter (DLL Function)

 SetCallback (DLL Function): set callback function.

 SelectPanel (DLL Function): for the second detector initialization.


 InitializeOneDetector
 InitializeDetector (DLL Function)
 LoadPixelMap (DLL Function)
 LoadGainMap (DLL Function)
 LoadFilter (DLL Function)

 SelectPanel(DLL Function): To use detector after initializing.

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..

For definition of DLL functions, please refer to DRTECH API Reference.pdf.

DRTECH Corporation - 43 -
API SDK Manual for EVS Detectors Rev.46

4.2.2.1. DrtechInitialize

Code 1. DrtechInitialize Function

DRTECH Corporation - 44 -
API SDK Manual for EVS Detectors Rev.46

- SelectPanel DLL Function


Before initialization (and all of other functional commands you want), you must select detector.
The index of the detector start from 0, and added by one. (0, 1, 2)
Do NOT initialize in random order. It will work abnormally.
SelectPanel DLL function always returns 1 when you call before initialize, so you don’t need to check
the return value at this time.

- SetCallback DLL Function


Call SetCallback DLL Function to get call-back message.
DrtechConsole uses “CallbackMessageProcess” function to process call-back message.

DRTECH Corporation - 45 -
API SDK Manual for EVS Detectors Rev.46

4.2.2.2. InitializeOneDetector

Code 2. InitializeOneDetector Function

- InitializeDetector DLL Function


This function allocates memory and runs API server.
You must input Detector Model Type Number as we defined.

DRTECH Corporation - 46 -
API SDK Manual for EVS Detectors Rev.46

Table 4. DRTECH Detector Model Type Number and Image Resolution


Detector Model Type Number Width Height Pixel Size (㎛)
EVS 4343 22 3072 3072 140
EVS 3643 25 2560 3072 140
EVS 4343G 32 3072 3072 140
EVS 3643G 33 2560 3072 140
EVS 2430 34 3840 3072 76
EVS 2430W 35 3840 3072 76
EXT 2430 36 3840 3072 76
EVS 2430G 37 3840 3072 76
EVS 2430GW 38 3840 3072 76
EXT 2430G 39 3840 3072 76
EXT 2430H 50 3840 3072 76
EVS 2430We 56 3840 3072 76
EXT 1024S 67 1280 3072 76
EXT 1824G 74 3072 2304 76
EXT 3643S 500 2560 3072 140
EXT 2143S 504 1536 3272 140
EXT 1036B 507 768 2304 140
EXT 1036BW 506 768 2304 140
EXT 1024C 509 1024 2406 100
EXT 1043B 510 1024 4300 100
EXT 1024B 511 1024 2406 100
EXT 3643U 4000 3532 4302 100
EXT 3643UH 4001 3532 4302 100
EXT 2430U 4002 3840 3072 76
EXT 2430UH 4003 3840 3072 76
EXT 4357U 4004 4096 3072 140
EXT 4357UH 4005 4096 3072 140
If you want to know other detectors, please refer to DRTECH API Reference.pdf.

DRTECH Corporation - 47 -
API SDK Manual for EVS Detectors Rev.46

- LoadPixelMap, LoadGainMap DLL Functions


DRTECH provides 3 map files for each detector.
They are Pixel Map (*.AMAP or MAP), Gain Map (*.AGMP or GMP), and Panel Map (*.APMP or PMP)
The map files have the serial number of its detector as default, but you can modify the filename and
determine its path. Just input the exact path you determined.
- LoadFilter DLL Function
Some hospitals wants DRTECH Grid Solution, and DRTECH Grid solution uses its own Filter file.
The filter files are in Filter folder under ECali1 folder.
- Map Path Recommendation
As DrtechConsole loads map files, define the name of map files strictly, and descript its name on your
software manual. Users can rename and copy the map files if they know the names and the folder you
defined.
Please take care if you use relative path, and the folder in execution file of your software is different
with the folder in DRTECH API DLL file.

4.2.3. Sample Codes for Usage


In DrtechConsole, function structure of Usage is followed:

 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.

 CallbackMessageProcess: process callback messages


 GetImageBuffer (DLL Function): To get x-ray image buffer pointer

 CDrtechConsoleDlg::OnBnClickedButtonDarkScan
 RequestDarkScan (DLL Function): Scan dark (offset) image and save.

DRTECH Corporation - 48 -
API SDK Manual for EVS Detectors Rev.46

4.2.3.1. OnBnClickedButtonSelect0, 1 and 2

Code 3. OnBnClickedButtonSelect0, 1 and 2 Sample Code

- SelectPanel DLL Function


Please check its return value. Sometimes SelectPanel DLL function fails when:
 The given index is invalid.
 The detector of the given index is not initialized.
 The selecting detector is Sync. Trigger mode without SSU connection.
 Other internal errors are occurred.

DRTECH Corporation - 49 -
API SDK Manual for EVS Detectors Rev.46

4.2.3.2. CallbackMessageProcess

Code 4. CallbackMessageProcess Function

DRTECH Corporation - 50 -
API SDK Manual for EVS Detectors Rev.46

* You will receive messages only from selected detector


If you initialize and use two or more detectors, you will get call-back messages only from selected
detector by SelectPanel DLL function.

- Message Type and Sub Information


Every call-back message has unique message type number, so you can know what kind of messages
you received.
Some messages have sub information. You can get it from the second parameter “char* pMsg”.
The sub information has various data type, and you should do type casting to get information.

Table 5. Message Type


Message Name Type Number Sub Information Description
IDC_XCF_RECEIVED 0x1008 YES (Structure) API has received an X-ray image.
IDC_READY_STATUS 0x1014 YES (Integer) READY / BUSY Status of the detector.
For more messages, please refer to A1. Call-back Messages

- 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.

Code 5. CallbackDataImageNew Structure

DRTECH Corporation - 52 -
API SDK Manual for EVS Detectors Rev.46

Code 6. Sample Code For IDC_XCF_RECEIVED

DRTECH Corporation - 53 -
API SDK Manual for EVS Detectors Rev.46

4.2.3.4. OnBnClickedButtonDarkScan

Code 7. OnBnClickedButtonDarkScan Function

- RequestDarkScan DLL Function


Get dark image, or offset image from each detectors.
You can do dark scanning to not selected detector.

DRTECH Corporation - 54 -
API SDK Manual for EVS Detectors Rev.46

4.2.4. Sample Codes for Finalization

4.2.4.1. OnBnClickedFinalize Function

Code 8. OnBnClickedFinalize Function

- FinalizeDetector DLL Function


You want to finish DRTECH API, just call FinalizeDetector DLL function.

DRTECH Corporation - 55 -
API SDK Manual for EVS Detectors Rev.46

Appendix A. API Reference Document


Model type and DLL function information are moved to DRTECH API Reference.pdf document.

A1. Call-back Messages


You can receive call-back messages only from selected detector.

A1.1. Essential Messages


Message Name Number Sub Information Brief Description
IDC_XCF_RECEIVED 0x1008 YES (Structure) API has received an x-ray image.
IDC_READY_STATUS 0x1014 YES (Integer) READY / BUSY Status of the detector.
0: BUSY (can’t take x-ray)
1: READY
3: AWAKE (Optional)
Please refer to Code 4. CallbackMessageProcess Function.

DRTECH Corporation - 56 -
API SDK Manual for EVS Detectors Rev.46

A1.2. Additional Messages


Message Name Number Sub Info. Brief Description
IDC_DEVICE_READY 0x1004 NO Detector is connected
IDC_SERIAL_MESSAGE 0x1007 YES (Integer) Detector scanning status
Refer to GetSerialMessage DLL
function.
IDC_DISCONNECTED 0x1011 NO Detector is disconnected
IDC_BATTERY_INFO 0x1013 YES (Structure) Wireless detector Only.
struct CB_IDC_BATTERY_INFO
{
int nBattryValue;
int nPanelIndex;
int nBatteryTemperature;
};

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

0 ~ 100: Wi-Fi signal sensitivity


from 0 to 100 %. (Wireless
connection Only).
IDC_EXP_TYPE 0x1020 YES (Integer) 1: USB Hand Switch
2: AED
3: Sync. Trigger
IDC_AED_ABORT 0x1021 NO This scanning is abnormal AED. If
you get IDC_SERIAL_MESSAGE call-
back message with 2 as its sub-
information, please cancel it.
For this, please refer 3.3. Exposure
Mode: 4 Different Triggering
Configurations (p. 29).
IDC_DARK_SCAN_ONE_START 0x1100 NO Dark scanning is started
Refer to RequestDarkScan DLL
function.
IDC_DARK_SCAN_ONE_END 0x1101 NO Dark scanning is ended
Refer to RequestDarkScan DLL
function.
IDC_TEMPERATURE 0x1104 YES (Integer) Internal temperature of the
selected detector. (celcius)
IDC_RECEIVED_PREVIEW 0x1108 YES (structure) API has received an x-ray preview
image.
Refer to GetPreviewImageBuffer
DLL function.
IDC_SLEEP_MODE 0x110B YES (Integer) Wireless detector Only. Sleep status
-1: Unknown (Disconnected)
0: Not sleep mode
1: Sleep mode
2: Deep sleep mode
IDC_UNSENT_IMG_EXIST 0x110C NO Please refer to 3.6 Resent images.
IDC_UNSENT_IMG_DOWNLOAD 0x110D YES (structure) Progress of unsent image
downloading.

DRTECH Corporation - 58 -
API SDK Manual for EVS Detectors Rev.46

Struct UnsentDownload
{
int nDownloadCount;
int nTotalCount;
}

If the downloading fails,


nDownloadCount and nTotalCount
will be -1.
IDC_WARNING 0x110E YES (Integer) Please refer to A1.3. Warning
Code.
IDC_CUSTOM_RESPONSE 0x110F YES (char*) Custom response.
IDC_WPCS_LOCATION 0x1110 YES (structure) The selected detector is located
and charging on the given WPCS
module.
Refer "EVS3643_SampleProgram"
for detail usage.
IDC_CONNECTED_MT 0x1113 YES (Structure) Generated when uninitialized
detector is connected. Please
initialize with a correct model type.
You will receive the following
structure as sub information.

struct UninitializedModelType
{
int nModelType;
char szSN[17];
};

Refer DRTECH_SetDetectorSN DLL


function and “DrtechConsole”
sample program.
IDC_BINNING_MODE 0x1116 YES (Integer) Only for EVS 2430 Series. If its
subinfo is 0, then the selected

DRTECH Corporation - 59 -
API SDK Manual for EVS Detectors Rev.46

detector is HR mode, and if 1, the


selected detector is HT mode.
About HR / HT mode, please refer
to 3.5. HT Mode (p.34).
IDC_GYRO 0x1119 YES (int[6]) Generated when gyro sensor value
is arrived from detector. The format
of the values are int[6] array, and
the values are:
int[0]: Accel X
int[1]: Accel Y
int[2]: Accel Z
int[3]: Gyro X
int[4]: Gyro Y
int[5]: Gyro Z
IDC_SOFTWARE_TRIGGER_COUNT 0x111B YES (Integer) Generated when N(=subinfo)th
software triggering is started. N
starts from 1.
IDC_EXPOSURE_WINDOW_STATUS 0x111D YES (Integer) 1 when opened
0 when closed

DRTECH Corporation - 60 -
API SDK Manual for EVS Detectors Rev.46

Sample Code for IDC_DEVICE_READY, IDC_DISCONNECTED, IDC_SIGNAL_QUALITY

DRTECH Corporation - 61 -
API SDK Manual for EVS Detectors Rev.46

A1.3. Warning Code.


DRETCH API announces some warning code via IDC_WARNING (0x110E) call-back message.
You can get default description text by using GetWarningText DLL Function.

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

Appendix B. Trouble Shooting

When you have some troubles, please contact to DRTECH CS TEAM with following data.

 The time when the trouble occurs.


 This is very important. Date, hour, minute, and second (if possible) information can help to
analyze the problem.
 DRTECH API Log files
 You can find them on "%appdata%\DRTECH" folder.
Please compress "%appdata%\DRTECH\Log" folder and send to us.
Please attach "%appdata%\DRTECH\DRTECH.ini" file, too.
 DRTECH API crash dump files
 If DRTECH API has been crashed, please compress "C:\Dumps" folder and send to us.
 Detector log files
 You can download them on "http://{Detector IP}/upload.html" page via web browser.
 If the IP address of the detector is "192.168.250.135", then the web address will be
"http://192.168.250.135/upload.html".
 You can find http links for logs on the bottom of the page. Please get all of the log files.
 Raw image files
 If an acquired image is abnormal, please attach its RAW image (before applying your image
processing).

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.

- Intel Hyper Threading issue


If you use i3/i7 desktop CPU or i5 laptop CPU, then your system might use Intel Hyper Threading.
By Intel Hyper Threading, your CPU has more number of cores than physical core of CPU. (If your CPU’s
number of logical cores and physical cores are the same, then your CPU doesn’t use Intel Hyper
Threading or like that.)
Sometimes, Intel Hyper Threading makes DRTECH API processing SLOW. If then, turn off Intel Hyper
Threading by changing Windows configuration.

DRTECH Corporation - 63 -
API SDK Manual for EVS Detectors Rev.46

- When you see ‘Pure virtual function error’


If your software uses Intel OpenMP library, this error message can be shown. DRTECH API also uses
OpenMP library, and if the version of OpenMP is different with your software, OpenMP version conflict
will be occurred. In this case, you should add ‘KMP_DUPLICATE_LIB_OK’ variable to Windows’s
environment variable, with value TRUE.

- If you can’t receive any call-back messages


If your wrapper program is ‘Win32 Console Application’ program, this error message can be shown.
Please make wrapper program as MFC Application for compatibility.

DRTECH Corporation - 64 -
API SDK Manual for EVS Detectors Rev.46

Appendix C. CR (Portable) Mode Function (Optional Function)


1. CR Mode
Some wireless detectors have a special function called CR (Portable) Mode.
In this mode, you can take x-rays without console PC. You can take x-rays only with the detector.

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.

Figure 6. ECali1 setting for CR mode 1


③ Check ‘Enable AP button’ in ‘Hardware setting’
④ Click ‘Detector Advanced setting..’
⑤ On the ‘Wireless’ tab, set ‘WirelessNum’ in ‘IP’ category to ‘AP_1 <> CR Mode (AP_3) and save.

Figure 7. ECali1 setting for CR mode 2

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.

Figure 8. CR Mode setting (AP button)

※ If detector is a wired connection, it will not switch to CR mode.

DRTECH Corporation - 66 -
API SDK Manual for EVS Detectors Rev.46

4. CR Mode Sample Program


1) CRMode_Order
CRMode_Order provides the ability to l CR orders stored in detector and add a new order.

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

◎ Add New Order (④)


Add a new CR order. As an example of Figure 11, enter ID / Patient name / Projection / Accession
number (Acc. No), and a new CR order will be stored with order information using ‘_’ as a separator.
While using CR mode, accession number is displayed in LED of the detector, so accession number
should not be duplicated.

Figure 10. Click ADD button (④)

Please refer detailed codes in the sample code.


You can find related DLL functions, call-back messages, and structures in the bottom of
DrtechDefinition.h of CRMode_Order sample program

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.

Figure 11. CRMode_Image


① Initialize detector.
② CR image list window.
③ Check and download unsent images in detector.
④ Displays the unsent / CR images stored in the detector to ②.
⑤ Download the selected image to the running folder.
⑥ Delete selected image in detector.
⑦ Display the thumbnail of the selected image in detector.

Please refer detailed codes in the sample code.


You can find related DLL functions, call-back messages, and structures in the bottom of
DrtechDefinition.h of CRMode_Image sample program

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.

1) Pre-inputted Order Usage


If the order schedule is pre-defined, you can input the order schedule to the detector.
① Input order schedule to the detector using API DLL function.
This work should be performed on PC (API using is needed).
② Change the detector to CR (Portable) Mode.
Using AP button on the detector, or API DLL function.
③ Take detector and your own cell phone or tablet.
④ Access following web site using your cell phone or tablet:
http://192.168.250.135/orderlist.php
"192.168.250.135" is the IP address of the detector.
⑤ Take x-rays with selecting orders on the web site.
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.

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.

For inputting orders, please refer CRMode_Order sample program.


For downloading images, please refer CRMode_Image sample program.

DRTECH Corporation - 70 -
API SDK Manual for EVS Detectors Rev.46

Appendix D. Take an x-ray image without x-ray source

1. For Testing without software integration

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.

Please use this function for development only.

To do this, you should connect the detector. If you don't have any DRTECH detector, you can't do this.

Refer following step:


1) Change ACQ Type to "USB Hand Switch"
You can this on configuration of Ecali1 or 'SetExposureType' DLL function.

2) go to %appdata%\DRTECH folder and open DRTECH.ini file in there.

3) Find "[API]" text, and add "DEV_MODE=1" text blow "[API]".

If there is already "DEV_MODE" text, then just set the value to 1.


Be careful. Don't be confused with "[DEV_MODE]" text.

DRTECH Corporation - 71 -
API SDK Manual for EVS Detectors Rev.46

4) Find "[DEV_MODE]" text, and add "ENABEL_SHORTCUT" text below "[DEV_MODE].

If there is already "ENABLE_SHORTCUT" text, then just set the value to 1.

5) Save and close the DRTECH.ini file

6) Restart the software that uses DRTECH API.

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

2. Using software trigger with software integration

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:

1) extern "C" int __stdcall SetReadySerial();


2) extern "C" int __stdcall SetExposureSerial();
3) extern "C" int __stdcall SetReadyCancelSerial();

These functions returns


-1 if the detector is not initialized.
1 if success to request.

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

Sequence of software shot using DRTECH API DLL functions.

If you skip calling SetReadyCancelSerial(), then you can’t do software trigger more.

DRTECH Corporation - 74 -

You might also like