123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401 |
- // Copyright (c) 2006-2012 E-COM. All Rights Reserved.
- // All the information contained in this file remain the sole and exclusive
- // property of E-COM and shall not be disclosed by the recipient to a third
- // party without the prior consent of E-COM.
- /*! \file FPDRAD-TYEPS.h
- Abstract:
- This module is used for the FPDRADTYPES API.
- It includes :
- - the constants definitions.
- - the types definitions.
- */
- #ifndef FPDRAD_TYPES_H
- #define FPDRAD_TYPES_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- //! Warning codes
- typedef enum
- {
- LOW_PRIORITY_WARN = 0,
- WARN_SUCCESS = LOW_PRIORITY_WARN + 0, //探测器休眠 此时应禁止曝光
- NORMAL_PRIORITY_WARN = 1000,
- WARN_OTHERS = NORMAL_PRIORITY_WARN + 0, //
- WARN_BATTERY = NORMAL_PRIORITY_WARN + 1, //电量低
- WARN_WIFI = NORMAL_PRIORITY_WARN + 2, // wifi低
- WARN_TEMPRATURE = NORMAL_PRIORITY_WARN + 3, //温度高
- WARN_LOAD_CALFILE = NORMAL_PRIORITY_WARN + 4,// 加载校正文件失败
- WARN_LOAD_OFFSET_REF = NORMAL_PRIORITY_WARN + 5, //加载OFFSET校正文件失败
- WARN_LOAD_GAIN = NORMAL_PRIORITY_WARN + 6, //加载GAIN校正文件失败
- WARN_LOAD_DEFECTMAP = NORMAL_PRIORITY_WARN + 7, //加载坏点校正文件失败
- WARN_SELECT_DETECTOR = NORMAL_PRIORITY_WARN + 8, //切换探测器失败
- WARN_DENOTED_IMAGE_NONE = NORMAL_PRIORITY_WARN +9,
- } warning_status;
- //! Error codes
- typedef enum
- {
- LOW_PRIORITY_ERROR = 0, //提示错误,但不能恢复
- ERR_BATTERY = LOW_PRIORITY_ERROR + 1, //电量过低
- ERR_WIFI = LOW_PRIORITY_ERROR + 2, // wifi过低
- ERR_TEMPRATURE = LOW_PRIORITY_ERROR + 3, //温度过高
- ERR_SELECT_DETECTOR = LOW_PRIORITY_ERROR + 4, //切换探测器失败
- NORMAL_PRIORITY_ERROR = 1000,
- ERR_SLEEP = NORMAL_PRIORITY_ERROR + 1, //探测器休眠 此时应禁止曝光
- ERR_ACQ_FAILED = NORMAL_PRIORITY_ERROR + 2, //曝光后采集图像失败,但不能恢复图像
- ERR_RECOVER_IMAGE = NORMAL_PRIORITY_ERROR + 3, //曝光后采集图像失败,可恢复图像
- ERR_DISCONNECT = NORMAL_PRIORITY_ERROR + 4, //探测器连接中断
- ERR_DETECTOR_REQUEST = NORMAL_PRIORITY_ERROR + 5, //探测器请求曝光失败
- FATAL_PRIORITY_ERROR = 2000,
- ERR_INIT_FAILED = FATAL_PRIORITY_ERROR + 1, //初始化失败
- ERR_POWEROFF = FATAL_PRIORITY_ERROR + 2, //探测器没电关机
- ERR_LOAD_API = FATAL_PRIORITY_ERROR + 3, //加载API失败
- ERR_KEY_MISSED = FATAL_PRIORITY_ERROR + 4, //缺少探测器key文件
- ERR_BAD_PARAMETER = FATAL_PRIORITY_ERROR + 5, //参数设置有误
- ERR_COMMUNICATION = FATAL_PRIORITY_ERROR + 6, //探测器通信失败或错误
- } error_status;
- //! Activity state
- typedef enum
- {
- // System state
- STATE_BOOTUP = 1,
- STATE_INITIALIZING,
- STATE_STANDBY,
- STATE_SLEEP,
- STATE_WORK,
- STATE_CALIBRATION,
- STATE_CONVENIENT,
- STATE_ERROR
- } system_state;
- //! Application mode
- typedef enum
- {
- APPLICATION_MODE1,
- APPLICATION_MODE2,
- APPLICATION_MODE3
- } application_mode;
- //! Operating mode
- typedef enum
- {
- OM_DEFAULT,
- OM_RAD,
- OM_DUAL_ENERGY,
- OM_POSITIONING,
- OM_DIGITAL_TOMO,
- OM_RAW
- } operating_mode;
- //! Correction Type
- typedef enum {
- CT_NONE = 0x0,
- //! defines the Offset correction
- CT_OFFSET = 0x1,
- //! defines the Gain correction
- CT_GAIN = 0x2,
- //! defines the Defect correction
- CT_DEFECT = 0x4,
- //! defines the Butting Cross/Line Correction
- CT_BUTTING = 0x8,
- //! defines the Echo Line Correction
- CT_ECHO_LINE = 0x10,
- //! defines the pixels cluster defect Correction
- CT_PIXELS_CLUSTER_DEFECT = 0x20,
- //! defines the Clipping Correction
- CT_CLIPPING = 0x40,
- //! enables all possible corrections
- CT_ALL = 0xFFFF
- } correction_type;
- //! Image type
- typedef enum
- {
- IT_OFFSET = 1,
- IT_X,
- IT_DEFECT_MAP
- } image_type;
- //! Detector state
- typedef enum
- {
- DS_OPERATION = 1,
- DS_SERVICE,
- DS_DOWNLOAD,
- DS_STANDBY,
- DS_BOOT,
- DS_SLEEP,
- DS_ERROR,
- DS_NOTDEFINED = -1
- } detector_state;
- //! type of data
- typedef enum
- {
-
- DT_FLOAT_TYPE = 1, //< 32-bit floating point
- DT_USHORT_TYPE, //< 16-bit unsigned short
- } data_type;
- //! Image information
- typedef struct
- {
- //! Data size in bytes
- unsigned long dataSize;
- //! number of bits for a pixel
- unsigned short bitsPerPixel;
- //! Horizontal image pixel size
- unsigned short sizeX;
- //! Vertical image pixel size
- unsigned short sizeY;
- } ImageParameters;
- //! Global Image Structure
- typedef struct
- {
- //! memory pointer on the image buffer
- void * imgPtr;
- //! image parameters
- ImageParameters imgParam;
- } acquisition_image;
- //! structure of configuration parameters
- typedef struct
- {
- unsigned short nbDetectors;
- } config_parameters;
- //! structure of Hardware status
- typedef struct
- {
- unsigned short nbDetectors;
- //! structure of detector status
- struct DetectorStatus
- {
- float temperature; //< detector temperature
- struct BatteryStatus
- {
- bool present; //< battery present or not in the detector
- unsigned short charge; //< charge level of the battery (in %)
- } *batteryStatus;
-
- struct WifiStatus
- {
- bool present; //< WI-FI present or not in the detector
- unsigned short linkQuality; //< Link quality
- } *wifiStatus;
- } * detectorStatus;
- } hardware_status;
- //! detector pattern
- typedef enum
- {
- DP_NORMAL = 0, //< Normal image
- DP_STATIC, //< Digital static ramp
- DP_DYNAMIC, //< Digital dynamic ramp
- DP_ANALOG, //< Analog pattern
- DP_RANDOM //< Pseudo random pattern (GPSA)
- } detector_pattern;
- typedef enum
- {
- BIN0 = 0
- }binning_mode;
- typedef enum
- {
- XWINDOW_500MS,
- XWINDOW_1000MS
- }xwindow_mdoe;
- //! structure of exposure mode
- typedef struct
- {
- detector_pattern detectorPattern;
- binning_mode binningMode;
- xwindow_mdoe XWindowMode;
- }exposur_mode;
- typedef enum
- {
- // Image Pixel Module
- ECM_SAMPLES_PER_PIXEL, // 图像的采样通道数目:1
- ECM_ROW, // 图像行的数目(高)
- ECM_COLUMNS, // 图像列的数目(宽)
- ECM_BITS_ALLOCATED, // 为每个像素分配的位数
- ECM_BITS_STORED, // 每个像素存储占用的位数
- ECM_HIGH_BIT, // 最高位在分配的存储单元中的位置
- ECM_PIXEL_REPRESENTATION, // 每个像素的解释方式:0
- //ECM_PIXEL_ASPECT_RATIO, // 像素宽高比: 1:1
- // DX Detector Module
- ECM_DETECTOR_ACTIVE_TIME, // 曝光窗口
- ECM_DETECTOR_ACTIVATION_OFFSET_FROM_EXPOSURE, // 曝光开始后多长时间曝光窗口打开:0
- ECM_FIELD_OF_VIEW_SHAPE, //可视区(遮光器)形状Enumerated Values: RECTANGLE ROUND HEXAGONAL: 方形,原型,六角形;
- ECM_FIELD_OF_VIEW_DIMENSION, // RECTANGLE: row dimension followed by column. 宽\高
- // ROUND: diameter. 半径
- // HEXAGONAL: diameter of a circumscribed circle. 外切圆半径
- ECM_FIELD_OF_VIEW_ORIGIN, //
- ECM_FIELD_OF_VIEW_ROTATION, // 0, 90, 180, 270
- ECM_FIELD_OF_VIEW_HORIZAONTAL_FLIP, // NO YES;注意,先旋转后水平翻转
- ECM_IMAGE_PIXEL_SPACING, // 像素间距
- ECM_DETECTOR_TYPE, // 探测器类型:SCINTILLATOR
- ECM_DETECTOR_CONFIGURATION, // 面板:AREA
- ECM_DETECTOR_ID, // 采集当前图像的探测器的ID或者序列号
- ECM_DATE_OF_LAST_DETECTOR_CALIBRATION, // 上一次探测器校正的日期
- ECM_TIME_OF_LAST_DETECTOR_CALIBRATION, // 上一次探测器校正的时间
- ECM_EXPOSURE_ON_DETECTOR_SINCE_LAST_CALIBRATION,// 上次校正以来的曝光次数
- ECM_EXPOSURE_ON_DETECTOR_SINCE_MANUFACTURED, // 出厂以来的曝光次数
- ECM_DETECTOR_TIME_SINCE_LAST_EXPOSURE, // 上次曝光到这次曝光之间的间隔
- ECM_DETECTOR_BINNING, // 探测器像素和输出图像之间的合并关系
- ECM_DETECTOR_CONDITION_NOMINAL_FLAG, // YES NO;比如温度过高,就不是正常
- ECM_DETECTOR_TEMPERATURE, // 探测器温度
- ECM_SENSITIVITY, // 厂商自定义
- ECM_DETECTOR_ELEMENT_PHYSICAL_SIZE, // 探测器物理尺寸
- ECM_DETECTOR_ELEMENT_SPACING, // 探测器元素间隔
- ECM_DETECTOR_ACTIVE_SHAPE, // 有效区形状
- ECM_DETECTOR_ACTIVE_DIMENSION, // 有效区尺寸
- // RECTANGLE: row dimension followed by column. 宽\高
- // ROUND: diameter. 半径
- // HEXAGONAL: diameter of a circumscribed circle. 外切圆半径
- ECM_DETECTOR_ACTIVE_ORIGIN, // 有效区原点
- // X-Ray Detector Module
- ECM_PHYSICAL_DETECTOR_SIZE, // 探测器的物理尺寸,单位 mm Row size\column size
- ECM_POSITON_OF_ISO_CENTER_PROJECTION, //
- }ecm_info;
- typedef enum
- {
- EVT_CODE_NA = 0,
- EVT_PREPARE,
- //! Sent when the detector is ready to make an exposure
- EVT_READY,
- //! Sent when XWidnwow open begins
- EVT_XWINDOW_ON,
- //! Sent when XWidnwow open ends
- EVT_XWINDOW_OFF,
- //! Sent when exposure image transmission begins
- EVT_START_TRANSMIT,
- //! Sent when exposure image transmission ends
- EVT_END_TRANSMIT,
- EVT_START_INI,
- EVT_END_INI,
-
- EVT_START_XRAY_CALIBRATION,
- EVT_END_XRAY_CALIBRATION,
- EVT_ABORT_XRAY_CALIBRATION,
- EVT_CALI_NO_IMG, //For Konica only
- EVT_CALI_RESULT //For Konica only
- } ste_code;
- //! structure for event data
- typedef struct
- {
- //unsigned short size;
- //error_status error;
- //unsigned short detector;
- //void * data;
- char data;
- } event_data;
- typedef enum
- {
- SYN_EXP_PREPARE = 0,
- SYN_EXP_READY,
- SYN_EXP_XWINDOWON,
- SYN_EXP_OVER,
- SYN_EXP_EIPON,
- SYN_EXP_EIPOFF,
- }syn_exposure_status;
- typedef enum
- {
- SYN_EVT_SYSTEM_STATUS = 100,
- SYN_EVT_EXPOSURE_STATUS = 200,
- }syn_event_id;
- #ifdef __cplusplus
- }
- #endif
- #endif // FPDRAD_TYPES_H
|