SDK Platform Programming Guide Dmed Series: Iray Technology (Shanghai) LTD
SDK Platform Programming Guide Dmed Series: Iray Technology (Shanghai) LTD
903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 1
Authors : Wei.You
Doc. No. : 903-341-86
Date : 2019-05-08
Version : A0
Status : Release
Project : N/A
1
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 2
Approver Haitao.Ning
Review Record
Department Participant Department Participant
Marketing Quality
Manufactory Service Youlin.Long
Revision History
2
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 3
目录
1. 概述................................................................................................................................................................. 4
2. SDK 开发包.....................................................................................................................................................6
2.1 使用 SDK 开发包.................................................................................................................................6
2.2 发布包目录结构...................................................................................................................................7
3. SDK 集成指南.................................................................................................................................................8
3.1 引用接口封装代码...............................................................................................................................8
3.2 接口调用示例代码及说明.................................................................................................................10
3.3 如何布署.............................................................................................................................................10
3.3.1 DLL 文件........................................................................................................................................................... 10
3.3.2 探测器工作目录............................................................................................................................................... 10
3.4 运行时产生的文件.............................................................................................................................11
4. SDK 接口详解............................................................................................................................................... 11
4.1 接口函数............................................................................................................................................. 11
4.2 指令集.................................................................................................................................................20
4.3 事件.....................................................................................................................................................23
4.4 属性.....................................................................................................................................................24
4.4.1 属性表 1 – 常用数据....................................................................................................................................... 25
4.4.2 属性表 2 – 配置数据....................................................................................................................................... 26
4.4.3 属性表 3 – User ROM 数据............................................................................................................................. 28
4.5 错误码.................................................................................................................................................31
4.6 枚举值.................................................................................................................................................34
4.7 结构体.................................................................................................................................................41
4.8 配置项.................................................................................................................................................42
4.9 探测器对象状态描述.........................................................................................................................43
4.10 事务...................................................................................................................................................43
5. 功能实现指南...............................................................................................................................................44
5.1 初始化.................................................................................................................................................44
5.1.1 连接探测器....................................................................................................................................................... 45
5.1.2 初始化............................................................................................................................................................... 46
5.2 读写探测器存储.................................................................................................................................46
5.3 配置工作模式.....................................................................................................................................47
5.3.1 工作模式配置文件........................................................................................................................................... 48
5.3.2 校正数据子集................................................................................................................................................... 49
5.3.3 工作模式切换................................................................................................................................................... 49
5.4 校正模板.............................................................................................................................................49
5.4.1 生成 PreOffset 校正模板.................................................................................................................................50
5.4.2 生成 Gain+defect 校正模板............................................................................................................................. 51
5.4.3 校正模板上传下载........................................................................................................................................... 52
5.4.4 加载模板........................................................................................................................................................... 52
5.5 图像采集.............................................................................................................................................54
5.5.1 SyncIn 模式........................................................................................................................................................54
5.5.2 SyncOut 模式..................................................................................................................................................... 56
3
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 4
6. 多板连接.......................................................................................................................................................56
6.1 Pleora 通讯............................................................................................................................................................57
6.2 光纤通讯............................................................................................................................................................... 57
6.3 UDP 通讯.............................................................................................................................................................. 57
7. 图像后处理...................................................................................................................................................57
6.1 干扰横纹处理....................................................................................................................................................... 58
6.2 单独应用缺陷校正.............................................................................................................................................. 58
1. 概述
4
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 5
5
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 6
2. SDK 开发包
2.2 发布包目录结构
SDK 软件开发包包含 dev、tools、help 三个子部分,结构图如下所示。
图 2.1 软件开发包结构
dev\cpp C++开发接口头文件;
dev\csC#开发接口包装;
dev\bin DLL 文件;
dev\work_dir 工作目录模板,包含配置文件;
tools\iDetector IRay 平板探测器控制软件工具;
tools\env_setup VC++、DotNet 运行库安装包,以及其他驱动软件安装程序;
help\doc 帮助文档;
help\example 示例代码;
7
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 8
3. SDK 集成指南
3.1 引用接口封装代码
8
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 9
9
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 10
3.2 接口调用示例代码及说明
本节以 C++编程语言为例演示 SDK 接口使用的基本概念,使用其他语言集成时语法
应有所不同,但是 SDK 接口使用的基本概念是一致的。
这些概念包括:
DLL 的加载
接口函数指针的获取
Detector 对象的创建和销毁
属性值的设置和获取
任务指令的调用
SDK 回调事件
3.3 如何布署
3.3.1 DLL 文件
3.3.2 探测器工作目录
10
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 11
工作目录下的文件包含该探测器的配置文件以及校正数据,以及探测器型号相关的
其他依赖信息。SDK 将使用该工作目录下的信息进行连接、设备逻辑控制、以及图像校
正。
初始的工作目录,可从随探测器发布的光盘获取,拷贝到用户软件系统自定义的路
径,请注意:设置该路径及下属子文件夹和文件属性为可写。
3.4 运行时产生的文件
运行时生成的日志文件位于探测器工作目录下,名称为“Detector.log”。
校正模板文件生成后位于探测器工作目录下“Correct\Default”子文件夹,当用户应
用层逻辑使用了校正模板分组(Subset)时,校正模板文件将保存于以用户指定的分组名
称命名的文件夹内,比如假设用户调用 Cmd_SetCaliSubset 带参数“Sub1”则校正模板文件
将保存到“Correct\Sub1”。
4. SDK 接口详解
4.1 接口函数
如前所述,FpdSys.DLL 以 C 语言的调用约定导出接口函数,本节将以 C 语言语法来
枚举这些接口函数。
接口函数的返回值,请参考 4.5 节错误码定义。
函数参数中涉及到的枚举值,请参考 4.6 节枚举值。
函数参数中涉及到的结构体定义,请参考 4.7 节结构体。
11
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 12
函数列表预览:
int GetSDKVersion (char szVersion[32])
int SetUserCode (char * pszUserCode)
int GetAuthority (int *pAuthority)
int RegisterScanNotify (FnNotifyScanResult pCallback)
int ScanOnce (char *pszSourceIP)
int GetProdCount (int *pCount)
int GetProdList (ProdInfo pProdList[], int nCount)
int GetErrInfo (int nErrorCode, ErrorInfo *pInfo)
int GetEnumItemsCount (char *pszEnumTypeName, int *pCount)
int GetEnumItemList (char *pszEnumTypeName, EnumItem pItemList[], int nCount)
int OpenDefectTemplateFile (const char *pszFilePath, void **ppHandler, unsigned short *pWidth,
unsigned short *pHeight, char **ppPoints, char **ppRows, char **ppCols, char **ppDualReadCols2)
int SaveDefectTemplateFile (void *pHandler)
int CloseDefectTemplateFile (void *pHandler)
回调函数列表:
typedef void(*FnCallback)(int nDetectorID, int nEventID, int nEventLevel, const char* pszMsg, int
nParam1, int nParam2, int nPtrParamLen, void* pParam)
函数详解(按照字典序):
12
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 13
13
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 14
14
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 15
int GetCmdParamInfo (int nDetectorID, int nCmdID, CmdParamInfo pInfoList[], int nCount)
GetCmdParamInfo: Query the parameter infomation list for a certain Command, please call
GetEnumItemsCount perviously to get the size for result receiving buffer.
Parameters:
nDetectorID [in] specify a detector
nCmdID [in] specify the Command
pInfoList [out] buffer to receive the result, each element of the array is an
CmdParamInfo struct
nCount [in] size of the buffer, must equals the result of "GetCmdParamCount"
Returns:
0: succeed, Non-Zero: error code
See also:
GetCmdParamCount
15
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 16
e
pItemList [out] buffer to receive the result, each element of the array is an EnumItem
struct
nCount [in] size of the buffer, must equals the result of "GetEnumItemsCount"
Returns:
0: succeed, Non-Zero: error code
See also:
GetEnumItemsCount
16
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 17
int Invoke (int nDetectorID, int nCommandID, IRayCmdParam pars[], int nParCount)
Invoke: Call SDK method using a pre-defined command ID, if "pending" returned, it means
an asynchronous task is started and the result will be callback later.
Parameters:
nDetectorID [in] specify a detector
nCommandID [in] specify an command for calling. 请参考4.2指令集
pars [in] parameter list for a certain command
nParCount [in] the count of parameters
Returns:
0: succeed, Non-Zero: "pending state" or error code
17
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 18
Returns:
0: succeed, Non-Zero: error code
18
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 19
4.2 指令集
用户程序对 SDK 指令的下发通过接口函数 Invoke 来实现,指令列表以及参数说明如
下表。如果指令调用返回值为 Err_TaskPending,意为任务已开始,正在执行中,用户需
等待异步结果返回。
Command Description Parameters
Enm_LogLevel
Cmd_SetLogLevel Set Log Level
eLogLevel;
20
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 21
21
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 22
Attr_RdResult_T1 &
Attr_RdResult_T2
Read current detector
Cmd_ReadHumidity humidity to
Attr_RdResult_Humidity
Start offset template
Cmd_OffsetGeneration
generation
Start gain template
Cmd_GainInit
generation
IVT_INT
Select image from acquired
Cmd_GainSelectCurrent nGainPointIndex;
list
IVT_INT nImageIndex;
IVT_INT
Select all image from
Cmd_GainSelectAll nGainPointIndex;
acquired list
IVT_INT nTotalImages;
Evt_TemplateFileDownload_R IVT_STR
esult strNewFilePath;
22
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 23
Enm_FileTypes
Select calibration file to
Cmd_SelectCaliFile eCaliFileType;
use in FPD
IVT_INT nMapIndex;
4.3 事件
本节介绍 iRay SDK 的回调事件,回调函数的定义以及如何注册,请参考 3.2 节示例
代码。关于回调事件,请注意如下事项:
回调事件的参数中,字符串以及指针类型的数据请即刻消费,或者做深拷贝备
份后使用,SDK 不保证指针所指向的内存在本次回调结束后的有效性。
回调函数的实现中请避免执行绘制窗口操作,因为回调可能来自其他线程。
回调函数的实现中请避免长时间阻塞操作,以免引起 SDK 内部等待超时。
23
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 24
4.4 属性
SDK 以属性的形式提供用户程序对数据的访问,这些数据包括配置项、状态值、控
制变量、物理量、以及探测器存储数据。用户程序可以通过 GetAttr 和 SetAttr 接口函数
24
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 25
读取和修改属性值。属性的访问权限标志为“R”的为可读,“W”为可写,“P”为 SDK
内部使用。
A
c U
c n
Attribute DataType Description
e i
s t
s
Attr_Prod_Name R IVT_STR Product name
Attr_Prod_Description R IVT_STR Product description
Attr_Prod_FullWidth R IVT_INT Full width of the image
Attr_Prod_FullHeight R IVT_INT Full height of the image
Attr_Prod_BitDepth R IVT_INT Bit Depth, by bits (14, 16)
Attr_WorkDir R IVT_STR Work directory
Enm_Dete
Attr_State R ctorStat State
e
Enm_Conn
Attr_ConnState R ectionSt Hardware connection state
ate
Attr_CurrentTask R IVT_INT Current task
Enm_Tran Current transaction, such as gain template
Attr_CurrentTransaction R
saction generation or defect template generation process
Attr_FsmState P IVT_INT Fsm state,just for factory developing diagnose
Attr_Width R IVT_INT Actually image width after binning zoom
Attr_Height R IVT_INT Actually image height after binning zoom
Enm_Auth
Attr_Authority P Authority level
ority
Enm_Conn
Attr_ConnState_CmdCh P ectionSt 0:break; 1:connected
ate
Enm_Conn
Attr_ConnState_ImgCh P ectionSt Image channel state
ate
Attr_FWUpdateProgress R IVT_INT 0%~100%
Attr_RdResult_T1 R IVT_FLT Detector inner temperature
Attr_RdResult_T2 R IVT_FLT Detector inner temperature
Attr_RdResult_Humidity R IVT_FLT Detector inner humidity
25
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 26
Acc
Attribute DataType Unit Description
ess
WorkDir protocol
Cfg_ProtocolEdition R IVT_INT
edition
WorkDir product
Cfg_ProductNo R IVT_INT
number
Cfg_SN W IVT_STR WorkDir SN
Cfg_DetectorImp P IVT_STR Detector DLL
Cfg_ConnImp P IVT_STR Connection DLL
Cfg_CaliImp P IVT_STR Calibration DLL
Cfg_LogLevel R Enm_LogLevel Log level
Cfg_HostIP W IVT_STR Local IP
Cfg_HostPort W IVT_INT Local port
Cfg_RemoteIP P IVT_STR Detector IP
Cfg_RemotePort P IVT_INT Detector port
Cfg_PleoraConnStr W IVT_STR Pleora connect
26
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 27
string
Cfg_PCIEBoardIndex W IVT_INT PCIE board index
Offset template
minut
Cfg_OffsetAlarmMinute W IVT_INT validity check
e
interval
Gain template
Cfg_GainAlarmTime W IVT_INT day validity check
interval
Defect template
Cfg_DefectAlarmTime W IVT_INT day validity check
interval
minut
Cfg_CaliValidity_PreWarnMinute W IVT_INT Pre-Warn minutes
e
Calibration
Cfg_CaliValidity_Enable W Enm_Switch template check
enable
Default selected
Cfg_DefaultSubset W IVT_STR
data set name
Default correct
Cfg_DefaultCorrectOption W IVT_INT
option
Defect statistical
Cfg_DefectStatistical_DummyTop P IVT_INT
dummy at top
Defect statistical
Cfg_DefectStatistical_DummyBottom P IVT_INT
dummy at bottom
Defect statistical
Cfg_DefectStatistical_DummyLeft P IVT_INT
dummy at left
Defect statistical
Cfg_DefectStatistical_DummyRight P IVT_INT
dummy at right
Delay time
Cfg_ClearAcqParam_DelayTime W IVT_INT ms parameter for
command ClearAcq
FPS checking
Cfg_FpsCheck_Enable P Enm_Switch
monitor enable flag
By
percent,e.g.value=
Cfg_FpsCheck_Tolerance P IVT_INT %
5 means tolerance is
5%
Firmware upgrade
Cfg_FWUpdTimeOut P IVT_INT s process timeout
value
Reset operation
Cfg_ResetTimeout P IVT_INT s
timeout value
27
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 28
Temperature high
Cfg_TemperatureHighThreshold P IVT_INT degC
threshold
Allow SN mismatch
Cfg_AllowMismatchSN P Enm_Switch
while connecting
Firmware allowed
defect points while
hardware defect
Cfg_FwAllowedDefectPoints P IVT_INT
correction, it is
limited by FPGA
capability
Ac
Un
Attribute ce DataType Description
it
ss
Attr_UROM_ProductNo R IVT_INT Product number
Attr_UROM_MainVersion R IVT_STR Main version
Attr_UROM_ReadVersion R IVT_STR Read version
Attr_UROM_MasterBuild
R IVT_STR Master build date time
Time
Attr_UROM_SlaveBuildT
R IVT_STR Slave build date time
ime
Attr_UROM_IntegrateTi
R IVT_INT us Integrate time
me
Attr_UROM_ZoomMode R Enm_Zoom Zoom mode, Range[0~13]
Attr_UROM_SequenceInt
R IVT_INT ms Time gap for continuouly sampling
ervalTime
Attr_UROM_SequenceInt
ervalTime_HighPrecisi R IVT_INT us Time gap for continuouly sampling
on
Attr_UROM_ExpMode R Enm_ExpMode Exposure mode
Enm_Trigger Trigger mode, work in static
Attr_UROM_TriggerMode R
Mode mode,eg.AEC,Manual
Attr_UROM_ExpWindowTi
R IVT_INT ms Exposure window time, for static mode
me
Attr_UROM_SyncExpTime R IVT_INT ms Exposure window time, for dynamic mode
Attr_UROM_SyncExpTime
R IVT_INT us Exposure window time, for dynamic mode
_HighPrecision
Attr_UROM_VT P IVT_FLT v Voltage
Attr_UROM_PGA R Enm_PGA PGA
28
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 29
Enm_FluroSy
Attr_UROM_FluroSync R Fluro sync mode
nc
Attr_UROM_SrcPort R IVT_INT Detector port
Attr_UROM_SrcIP R IVT_STR Detector IP
Attr_UROM_SrcMAC R IVT_STR Detector MAC
Attr_UROM_DestPort R IVT_INT Local(eg.PC) port
Attr_UROM_DestIP R IVT_STR Local(eg.PC) IP
Attr_UROM_DestMAC R IVT_STR Local(eg.PC) MAC
Attr_UROM_AcquireDela Delay time from command receiving to
R IVT_INT ms
yTime acquirement action
Attr_UROM_BinningMode R Enm_Binning Binning mode
Attr_UROM_AecMainTime R IVT_INT ms Aec main time
Attr_UROM_DynaOffsetG
R IVT_INT ms Dyna offset gap
apTime
Attr_UROM_HvgXRayEnab Enm_SignalL
R Hvg Xray enable
le evel
Enm_SignalL
Attr_UROM_HvgXRayOn R Hvg Xray on
evel
Attr_UROM_HvgXRaySync Enm_SignalL
R Hvg Xray sync out
Out evel
Attr_UROM_HvgXRaySync Enm_SignalL
R Hvg Xray sync in
In evel
Attr_UROM_SerialNo R IVT_STR Serial number
Attr_UROM_ExpTimeVali
R IVT_INT % Exposure time valid percentage
dPercent
Attr_UROM_PowSeriesCo Enable or disable offset correction
R Enm_Switch
rrectEnable with frequency composite coefficient
Attr_UROM_PulseClearT
R IVT_INT Clear times in pulse mode
imes
Attr_UROM_ROIColStart
R IVT_INT The begin column position of ROI
Pos
Attr_UROM_ROIColEndPo
R IVT_INT The end column position of ROI
s
Attr_UROM_ROIRowStart
R IVT_INT The begin row position of ROI
Pos
Attr_UROM_ROIRowEndPo
R IVT_INT The end row position of ROI
s
Attr_UROM_IntegrateTi
W IVT_INT us Integrate time
me_W
Attr_UROM_ZoomMode_W W Enm_Zoom Zoom mode
Attr_UROM_SequenceInt
W IVT_INT ms Time Gap for continuouly sampling
ervalTime_W
29
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 30
Attr_UROM_SequenceInt
ervalTime_HighPrecisi W IVT_INT us Time gap for continuouly sampling
on_W
Attr_UROM_PGA_W W Enm_PGA PGA
Attr_UROM_TriggerMode Enm_Trigger Trigger mode, work in static
W
_W Mode mode,eg.AEC,Manual
Attr_UROM_ExpWindowTi
W IVT_INT ms Exposure window time, for static mode
me_W
Enm_FluroSy
Attr_UROM_FluroSync_W W Fluro sync mode
nc
Attr_UROM_SrcIP_W W IVT_STR Src IP
Attr_UROM_SrcMAC_W W IVT_STR Src MAC
Attr_UROM_DestPort_W W IVT_INT Dest port
Attr_UROM_DestIP_W W IVT_STR Dest IP
Attr_UROM_DestMAC_W W IVT_STR Dest MAC
Attr_UROM_AcquireDela Delay time from command receiving to
W IVT_INT ms
yTime_W acquirement action
Attr_UROM_BinningMode
W Enm_Binning Binning mode
_W
Attr_UROM_AecMainTime
W IVT_INT ms Aec main time
_W
Attr_UROM_DynaOffsetG
W IVT_INT ms Dyna offset gap
apTime_W
Attr_UROM_HvgXRayEnab Enm_SignalL
W Hvg Xray enable
le_W evel
Enm_SignalL
Attr_UROM_HvgXRayOn_W W Hvg Xray on
evel
Attr_UROM_HvgXRaySync Enm_SignalL
W Hvg Xray sync out
Out_W evel
Attr_UROM_HvgXRaySync Enm_SignalL
W Hvg Xray sync in
In_W evel
Attr_UROM_ExpTimeVali
W IVT_INT % Exposure time valid percentage
dPercent_W
Attr_UROM_PowSeriesCo Enable or disable offset correction
W Enm_Switch
rrectEnable_W with frequency composite coefficient
Attr_UROM_PulseClearT
W IVT_INT Clear times in pulse mode
imes_W
Attr_UROM_ROIColStart
W IVT_INT The begin column position of ROI
Pos_W
Attr_UROM_ROIColEndPo
W IVT_INT The end column position of ROI
s_W
Attr_UROM_ROIRowStart W IVT_INT The begin row position of ROI
30
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 31
Pos_W
Attr_UROM_ROIRowEndPo
W IVT_INT The end row position of ROI
s_W
4.5 错误码
SDK 错误码用于提供给用户诊断信息,本节将列出所有的错误码定义。接口函数的
返回值是一个错误码,Error Level 的回调事件第一个参数也是错误码。 错误码列表如下。
Error Description
Err_OK OK
31
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 32
32
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 33
33
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 34
4.6 枚举值
enum IRAY_VAR_TYPE
{
IVT_INT = 0,
IVT_FLT = 1,
IVT_STR = 2,
};
enum IRAY_PARAM_TYPE
{
IPT_VARIANT = 0,
IPT_BLOCK = 100
};
enum Enm_EventLevel
{
Enm_EventLevel_Info = 0,
Enm_EventLevel_Warn = 1,
Enm_EventLevel_Error = 2,
Enm_EventLevel_Notify = 3,
};
enum Enm_LogLevel
{
Enm_LogLevel_Debug = 0,
Enm_LogLevel_Info = 1,
Enm_LogLevel_Warn = 2,
Enm_LogLevel_Error = 3,
Enm_LogLevel_Always = 4,
};
enum Enm_Authority
{
Enm_Authority_Basic = 0x0000,
Enm_Authority_RawImage = 0x0001,
34
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 35
Enm_Authority_Full = 0xFFFF,
};
enum Enm_Switch
{
Enm_Off = 0,
Enm_On = 1,
};
enum Enm_DetectorState
{
Enm_State_Unknown = 0,
Enm_State_Ready = 1,
Enm_State_Busy = 2,
Enm_State_Sleeping = 3,
};
enum Enm_Transaction
{
Enm_Transaction_Null = 0,
Enm_Transaction_GainGen = 1, // Generating Gain calibration templage
Enm_Transaction_DefectGen = 2, // Generating Defect calibration templage
};
enum Enm_ScannedState
{
Enm_ScannedState_NotFound = 0,
Enm_ScannedState_Occupy = 1,
Enm_ScannedState_Standby = 2,
};
enum Enm_ConnectionState
{
Enm_ConnState_Unknown = 0, // not initialized
Enm_ConnState_HardwareBreak = 1, // specified communication hardware can not find, or been
plugged out
Enm_ConnState_NotConnected = 2, // hardware exist but not ready for communication
Enm_ConnState_LowRate = 3, // connected but in bad situation
Enm_ConnState_OK = 4, // normal connected
};
enum Enm_Transaction
{
35
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 36
Enm_Transaction_Null = 0,
Enm_Transaction_GainGen = 1, // Generating Gain calibration templage
Enm_Transaction_DefectGen = 2, // Generating Defect calibration templage
};
enum Enm_ImageTag
{
Enm_ImageTag_Width = 0x0100, // Tiff tag: image width in pixels
Enm_ImageTag_Height = 0x0101, // Tiff tag: image height in pixels
Enm_ImageTag_BitsPerSample = 0x0102, // Tiff tag: bits per channel (sample)
Enm_ImageTag_Compression = 0x0103, // Tiff tag: data compression technique
Enm_ImageTag_PhotoMetric = 0x0106, // Tiff tag: photometric interpretation
Enm_ImageTag_Description = 0x010E, // Tiff tag: info about image
Enm_ImageTag_Maker = 0x010F, // Tiff tag: scanner manufacturer name
Enm_ImageTag_Model = 0x0110, // Tiff tag: scanner model name/number
Enm_ImageTag_StripOffsets = 0x0111, // Tiff tag: offsets to data strips
Enm_ImageTag_Orientation = 0x0112, // Tiff tag: image orientation
Enm_ImageTag_SamplePerPixel = 0x0115, // Tiff tag: samples per pixel
Enm_ImageTag_RowsPerStrip = 0x0116, // Tiff tag: rows per strip of data
Enm_ImageTag_StripByteCounts = 0x0117, // Tiff tag: bytes counts for strips
Enm_ImageTag_XResolution = 0x011A, // Tiff tag: pixels/resolution in x
Enm_ImageTag_YResolution = 0x011B, // Tiff tag: pixels/resolution in y
Enm_ImageTag_ResolutionUnit = 0x0128, // Tiff tag: units of resolutions
Enm_ImageTag_Software = 0x0131, // Tiff tag: name & release
Enm_ImageTag_DateTime = 0x0132, // Tiff tag: creation date and time
Enm_ImageTag_FrameNo = 0x8001, // Extern tag:
Enm_ImageTag_Temperature = 0x8002, // Extern tag:
Enm_ImageTag_RealFrequency = 0x8003, // Extern tag:
Enm_ImageTag_ExposureDelay = 0x8004, // Extern tag:
Enm_ImageTag_AcquireTime = 0x8005, // Extern tag:
Enm_ImageTag_KV = 0x8006, // Extern tag:
Enm_ImageTag_MA = 0x8007, // Extern tag:
Enm_ImageTag_MS = 0x8008, // Extern tag:
Enm_ImageTag_SID = 0x8009, // Extern tag:
Enm_ImageTag_Dose = 0x800A, // Extern tag:
Enm_ImageTag_ExposureLine = 0x800B, // Extern tag:
Enm_ImageTag_CorrectFlag = 0x800C, // Extern tag:
Enm_ImageTag_BinningMode = 0x800D, // Extern tag:
Enm_ImageTag_XRayWindow = 0x800E, // Extern tag:
Enm_ImageTag_FrameRate = 0x800F, // Extern tag:
Enm_ImageTag_BodyPartSection = 0x8010, // Extern tag:
Enm_ImageTag_BodyPart = 0x8011, // Extern tag:
Enm_ImageTag_DoseRate = 0x8012, // Extern tag:
36
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 37
enum Enm_Binning
{
Enm_Binning_Null = 0, // No binning
Enm_Binning_1 = 1, // 2x2 binning
Enm_Binning_2 = 2, // 4x4 binning
Enm_Binning_3 = 3, // 3x3 binning
};
enum Enm_Zoom
{
Enm_Zoom_Null = 0, // No zoom
Enm_Zoom_1024x640 = 1,
Enm_Zoom_1024x320 = 2,
Enm_Zoom_1024x4 = 3,
Enm_Zoom_1024x2 = 4,
Enm_Zoom_1024x1 = 5,
Enm_Zoom_512x512 = 6,
Enm_Zoom_256x256 = 7,
Enm_Zoom_3072x3072 = 8,
Enm_Zoom_2048x2048 = 9,
Enm_Zoom_1536x1536 = 10,
37
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 38
Enm_Zoom_1024x1024 = 11,
};
enum Enm_ReXferMode
{
Enm_ReXferMode_Null = 0,
Enm_ReXferMode_Packet = 1,
Enm_ReXferMode_Frame = 2,
};
enum Enm_CorrectOption
{
Enm_CorrectOp_HW_PreOffset = 0x0001,
Enm_CorrectOp_HW_PostOffset = 0x0002,
Enm_CorrectOp_HW_Gain = 0x0004,
Enm_CorrectOp_HW_MostGain = 0x0008,
Enm_CorrectOp_HW_Defect = 0x0010,
Enm_CorrectOp_HW_Ghost = 0x0020,
Enm_CorrectOp_HW_Lag = 0x0040,
Enm_CorrectOp_HW_MicroPhony = 0x0080,
Enm_CorrectOp_SW_PreOffset = 0x00010000,
Enm_CorrectOp_SW_PostOffset = 0x00020000,
Enm_CorrectOp_SW_Gain = 0x00040000,
Enm_CorrectOp_SW_MostGain = 0x00080000,
Enm_CorrectOp_SW_Defect = 0x00100000,
Enm_CorrectOp_SW_Ghost = 0x00200000,
Enm_CorrectOp_SW_Lag = 0x00400000,
Enm_CorrectOp_SW_MicroPhony = 0x00800000,
};
enum Enm_SubProductNo
{
Enm_SubProductNo_GoS = 0,
Enm_SubProductNo_CsI = 1,
Enm_SubProductNo_CsI400 = 2,
Enm_SubProductNo_CsI550 = 3,
};
enum Enm_SignalLevel
{
Enm_SignalLevel_Low = 0,
Enm_SignalLevel_High = 1,
};
38
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 39
enum Enm_FluroSync
{
Enm_FluroSync_FreeRun = 0,
Enm_FluroSync_SyncIn = 1,
Enm_FluroSync_SyncOut = 2,
};
enum Enm_PGA
{
Enm_PGA_0 = 0,
Enm_PGA_1 = 1,
Enm_PGA_2 = 2,
Enm_PGA_3 = 3,
Enm_PGA_4 = 4,
Enm_PGA_5 = 5,
Enm_PGA_6 = 6,
Enm_PGA_7 = 7,
Enm_PGA_8 = 8,
};
enum Enm_HWOffsetType
{
Enm_OffsetType_Null = 0,
Enm_OffsetType_Post = 1,
Enm_OffsetType_Pre = 2,
};
enum Enm_ExpMode
{
Enm_ExpMode_Null = 0x00,
Enm_ExpMode_Manual = 0x01,
Enm_ExpMode_AEC = 0x02,
Enm_ExpMode_Flush = 0x03,
Enm_ExpMode_Pulse = 0x80,
Enm_ExpMode_Continous = 0x81,
Enm_ExpMode_Linewise = 0x82,
};
enum Enm_FW_DeviceType
{
Enm_FW_DeviceType_MainFPGA = 0x01,
Enm_FW_DeviceType_ReadFPGA1 = 0x02,
39
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 40
Enm_FW_DeviceType_ReadFPGA2 = 0x03,
Enm_FW_DeviceType_ControlBox = 0x04,
Enm_FW_DeviceType_MCU1 = 0x10,
Enm_FW_DeviceType_AllInOne = 0xF0,
Enm_FW_DeviceType_None = 0xFF,
};
enum Enm_CaliDataState
{
Enm_CaliDataState_NoData = 0,
Enm_CaliDataState_Valid = 1,
Enm_CaliDataState_ValidWarn = 2,
Enm_CaliDataState_Invalid = 3,
};
enum Enm_NetworkInterface
{
Enm_NetworkInterface_Unknown = 0,
Enm_NetworkInterface_Cable = 1,
Enm_NetworkInterface_Wifi = 2,
};
enum Enm_FileTypes
{
Enm_File_Offset = 0x01,
Enm_File_Gain = 0x02,
Enm_File_MostGain = 0x03,
Enm_File_Defect = 0x04,
Enm_File_Lag = 0x05,
Enm_File_ArmLog = 0xA0,
Enm_File_Firmware = 0xA1,
};
enum Enm_ProdType
{
Enm_Prd_Venu1717F = 0x0001, // Venu1717F
Enm_Prd_Mercu0909F = 0x0006, // Mercu0909F
Enm_Prd_Mammo1012F = 0x000B, // Mammo1012F
Enm_Prd_NDT0505F = 0x000C, // NDT0505F
Enm_Prd_Venu1417W = 0x0016, // Venu1417W
Enm_Prd_Senu1417P = 0x001C, // Senu1417P
Enm_Prd_Venu1717M2 = 0x001D, // Venu1717M2
Enm_Prd_Penu1417P = 0x0019, // Penu1417P
40
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 41
4.7 结构体
注:SDK 接口所涉及的结构体,皆为 1 字节对齐。
typedef struct _tagIRayVariant
{
IRAY_VAR_TYPE vt;
struct
{
int nVal;
float fVal;
char strVal[IRAY_MAX_STR_LEN];
}val;
}IRayVariant;
enum IRAY_PARAM_TYPE
{
IPT_VARIANT = 0,
IPT_BLOCK = 100
};
41
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 42
IRAY_PARAM_TYPE pt;
IRayVariant var;
IRayDataBlock blc;
}IRayCmdParam;
4.8 配置项
每个探测器实例都对应一个配置文件,命名为“config.ini”,位于探测器工作目录,
关于工作目录的定义请参考章节 3.3.2 探测器工作目录。
42
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 43
4.9 探测器对象状态描述
SDK 内的探测器对象状态可以通过属性的方式获取,其属性 ID 定义为 Attr_State,值
定义为枚举 Enm_DetectorState。各状态描述如下:
Unknown 状态 – 探测器对象已创建,但是没有连接。此状态下可进行读写配置,
打开本地图像文件等与硬件设备无关的操作,也可调用扫描在线探测器的操作。
Ready 状态 – 探测器已经连接并处于可以工作的状态。此状态下可进行读写探
测器参数,做校正模板,以及图像采集等工作任务。
Busy 状态 – 探测器设备正在执行任务。此状态下拒绝设备操作有关指令(Stop
指令和 Abort 函数调用除外)。
如下为状态转换图:
图 4.9 探测器对象状态转换图
4.10 事务
事务指的是需用户程序和 SDK 多次交互才能完成的一次任务,目前 SDK 只定义了 Gain
模板生成、Defect 模板生成两种事务,请参考 4.6 枚举值 :Enm_Transaction,当前正在
进行何种事务可通过属性 Attr_CurrentTransaction 获取。
事务一:Gain 模板生成以 Cmd_GainInit 开始,以 Cmd_FinishGenerationProcess
结束;
事务二:Defect 模板生成以 Cmd_DefectInit 开始,以
Cmd_FinishGenerationProcess 结束;
43
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 44
5. 功能实现指南
5.1 初始化
44
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 45
5.1.1 连接探测器
图 5.1.1 建立和销毁探测器连接
45
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 46
5.1.2 初始化
图 5.1.2 初始化流程
5.2 读写探测器存储
46
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 47
图 5.2.1 读写探测器参数
5.3 配置工作模式
工作模式(ApplicationMode)是动态探测器相对于其他静态探测器所独有的概念,
工作模式由 PGA、Binning、Zoom(如果有)、FrameRate 组合决定,这个概念假定用户在实
际对探测器的使用过程当中,只会使用有限个数的这种组合。
47
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 48
5.3.1 工作模式配置文件
在探测器工作目录下存在配置文件 DynamicApplicationMode.ini,其中默认配置了
几种工作模式,用户可根据自己需要进行添加修改。
DynamicApplicationMode.ini 文件内容如下:
[ApplicationMode1]
PGA=0
Binning=0
Zoom=0
Frequency=10
ExposureMode=129
Subset=ABC
[ApplicationMode2]
PGA=0
Binning=0
Zoom=0
Frequency=5
ExposureMode=129
Subset=XYZ
[ApplicationMode3]
PGA=2
Binning=0
Zoom=0
Frequency=20
ExposureMode=129
Subset= 123
文件中的每个节点名称必须以“ApplicationMode”加上一个数字组成,该数字必须
是从 1 到 N 连续设置。
文件中各 SubSet 的名称必须是唯一的,因为需要被用来定位 ApplicationMode。
在使用中,SubSet 的名称具有一种特殊的应用方式:如果 PGA 和 Binning、Zoom 相
同的情况下,可以通过设置 Subset=XYZ-A 和 Subset=XYZ-B 共用 Gain 和 Defect 模板,对应
的校正模板文件均保存在前缀文件夹“XYZ”中,后缀 A 和 B 仅用来满足唯一性的要求。
48
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 49
2 AEC
(it apply to Mercu1717V)
3 Flush
(it apply to Mercu1717V)
128 Pulse
129 Continues
5.3.2 校正数据子集
校正模板文件生成后位于探测器工作目录下“Correct\Default”子文件夹,当用户应
用层逻辑使用了校正模板分组(Subset)时,校正模板文件将保存于以用户指定的分组名
称命名的文件夹内,比如假设用户调用 Cmd_SetCaliSubset 带参数“Sub1”则校正模板文件
将保存到“Correct\Sub1”。
5.3.3 工作模式切换
5.4 校正模板
在进行正常图像采集之前,必须先生成校正模板并设置相应的校正选项。
49
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 50
鉴于 PreOffset 模板容易失效,建议用户进行周期性的更新。有条件时,可以在采集
前进行更新。
可参考示例:Help\examples\Cpp(DotNet)\Dynamic_GenerateOffsetTemplate
51
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 52
5.4.3 校正模板上传下载
5.4.3.1 模板下载
具体请参考 Cmd_DownloadCaliFile 的用法。可参考示例代码:
Help\examples\Cpp(DotNet)\DownloadCorrectionFile2Device。
5.4.4.2 模板上传
具体请参考 Cmd_UploadCaliFile 的用法。
5.4.4 加载模板
5.4.4.1 加载软校正
具体请参考指令 Cmd_SetCorrectOption 的用法,参数为 Enm_CorrectOption 的 SW_xxx
的组合。
5.4.4.2 加载硬校正
1) 使用 HW_PreOffset 时,调用 Cmd_HwGeneratePreOffsettemplate 更新 PreOffset
模板。
2) 使用 HW_Gain 和 HW_Defect 时,需要先将模板下载到探测器中,参考 5.4.3.1;
查询探测器中存储的所有模板的信息,请参考 5.4.4.3。
3) 使用 Cmd_SelectCaliFile 加载对应的 HWGain 或者 HWDefect 模板。
4) 如果 Gain 使用 HW_Gain,则 PreOffset 校正须使用 HW 校正(即 HW_PreOffset, 下
同);如果 Defect 使用 HW_Defect,则 PreOffset 和 Gain 校正均须使用 HW 校正。
5.4.4.3 读硬校正模板信息
读取设备中模板的信息,请参考指令 Cmd_QueryHwCaliTemplateList。具体流程如下:
52
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 53
图 5.4.3 读取硬校正模板信息
可参考示例:Help\examples\Cpp(DotNet)\DownloadCorrectionFile2Device
5.5 图像采集
在不同触发模式或同步模式下图像采集流程不一样,不同的探测器所能够支持的模
式也不一样,用户在制定集成方案时,应当根据探测器型号以及各种模式的特点做出选
择。本章将介绍各种模式的优缺点并给出该种模式下如何通过对 SDK 的调用实现图像采
集流程。
5.5.1 SyncIn 模式
SyncIn 同步模式适用于奕瑞动态探测器系列透视模式下的连续采集,其特点是进入
透视模式后用户以脚闸等外部设备控制高压发生器同步探测器开始图像采集,松开脚闸
等控制设备即停止出光和采集,无需软件界面操作,特别适用于介入手术时医生对病体
部位的实时观察。以下是编程实现时对 SDK 的调用流程图:
54
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 55
55
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 56
5.5.2 SyncOut 模式
SyncOut 同步模式适用于奕瑞动态探测器系列透视模式下的连续采集以及点片单帧
采集,其特点是用户通过软件界面或 HMI 界面的操作实现不间断实时透视,或单帧点片
操作,无需对脚闸等外部设备的持续控制。以下是编程实现时对 SDK 的调用流程图:
6. 多板连接
56
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay
Doc No. 903-341-86
iRay Technology (Shanghai) Ltd. Version A0
SDK Platform Programming Guide DMED Date 2019-05-08
Series CH Page 57
2) ConnSGDMA: 光纤通讯
3) ConnUDPE50:UDP 通讯
Create 返回的 DetectorID 用于识别探测器。
6.1 Pleora 通讯
6.2 光纤通讯
6.3 UDP 通讯
7. 图像后处理
6.1 干扰横纹处理
用于处理电源或电磁干扰造成的严重横纹现象。
6.2 单独应用缺陷校正
用于消除用户在图像后处理过程中由于算法的耦合可能造成的重现坏点。以及可能
产生此现象的算法比如静态滤线栅去除算法。
58
文件包含奕瑞公司机密资料,非经奕瑞正式书面授权不得复制、打印、披露及传播该文件的任何内容。
This document contains confidential and proprietary information of iRay, any reproduction, disclosure, or use in whole or
in part is strictly prohibited, except as may be specifically authorized by prior written agreement or permission of iRay