123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322 |
- #pragma once
- typedef int FPD_EVENT;
- #define PNL_READY 1 //panel ready
- #define PNL_WINDOWON 2 //x-ray enable window on
- #define PNL_WINDOWOFF 3 //x-ray enable window off
- #define PNL_READING 4 //正在读图
- #define PNL_PREPARE 5 //正在准备,如calibration,结束standby等
- #define PNL_STANDBY 6 //standby模式
- #define PNL_ABORT 7 //放弃曝光
- #define PNL_IMGREDATA 8 //图像;
- #define PNL_WAKEBEGIN 9 //正在唤醒
- #define PNL_WAKEEND 10 //已经被唤醒
- #define PNL_OFFSET_CALSTATUS 11 //offset校正的状态
- #define PNL_GAIN_CALSTATUS 12 //gain校正的状态
- #define PNL_DEFECT_CALSTATUS 13 //defect校正的状态
- #define PNL_READING_PROGRESS 14 //读图状态
- #define PNL_DOSE 15 //dose值
- #define PNL_PREVIEWIMAGE_INFO 16 //preview图像信息
- #define PNL_FULLIMAGE_INFO 17 //full图像信息
- #define PNL_XRAY_WINDOWTIME 18 //曝光窗口大小
- #define PNL_SYNCMODE 19 //同步模式
- #define PNL_IMGREDATA_PREVIEW 20 //PREVIEW图像;
- #define PNL_HAVE_PREVIEW 21 // 是否有preview
- #define PNL_XRAY_CAL_NO_IMAGE 22 // 校正无图像
- #define PNL_FRAME_POST 23 // 校正无图像
- #define PNL_STATE 24 // 探测器状态
- #define PNL_ERR_CODE 25 // 探测器错误
- #define PNL_TEMPERATURE 26 // 温度值
- #define PNL_TEMPERATURE_STATE 27 //温度状态
- #define PNL_FRMAE_ERR_NOTIFY 28 //FrameErrNotify
- #define PNL_HAVE_IMG_CAL 29 //校正有无图标记
- #define PNL_OFFSET_TOTALNUM 30
- #define PNL_XRAY_TOTALNUM 31
- #define PNL_CAL_ACTIVE 32
- #define PNL_CAL_RUNNING 33
- #define PNL_CAL_PROCESS_COUNTER 34
- #define PNL_CAL_PAUSE 35
- #define PNL_CAL_RESULT 36
- #define PNL_CAL_END 37
- typedef int (WINAPI *callbackFPDEvent)(FPD_EVENT eventid, LPINT datastructure, void* pCustomData);
- //---------------------------------------------------------------------------------------
- //
- // 结构名称:ECOM_IMAGE_INFO
- // 结构说明:用来保存图像数据。
- //
- //---------------------------------------------------------------------------------------
- typedef struct tagImgInfo
- {
- unsigned int nWidth; // 影像宽
- unsigned int nHeight; // 影像高
- unsigned int nBits; // 影像大小(总数据位)
- WORD *pwData; // 影像数据结构头指针
- }ECOM_IMAGE_INFO;
- typedef struct tagPanelInfo
- {
- int nColumn; // 影像宽
- int nRow; // 影像高
- int nBits; // 影像大小(总数据位)
- float fDetectorTemprature;
- float fDetectorElementPhysicalSize;
- float fDetectorElementSpacing;
- string strDetectorType;
- string strDetectorID;
- string strDetectorBinning;
- //COleDateTime dtLastCalibrationDateTime;
- tagPanelInfo& operator =(const tagPanelInfo &PanelInfo)
- {
- nColumn = PanelInfo.nColumn;
- nRow = PanelInfo.nRow;
- nBits = PanelInfo.nBits;
- fDetectorTemprature = PanelInfo.fDetectorTemprature;
- fDetectorElementPhysicalSize = PanelInfo.fDetectorElementPhysicalSize;
- fDetectorElementSpacing = PanelInfo.fDetectorElementSpacing;
- strDetectorType=PanelInfo.strDetectorType;
- strDetectorID=PanelInfo.strDetectorID;
- strDetectorBinning= PanelInfo.strDetectorBinning;
- //dtLastCalibrationDateTime = PanelInfo.dtLastCalibrationDateTime;
- return *this;
- }
- }ECOM_PANEL_INFO;
- typedef struct
- {
- int nFullWidth;
- int nFullHeight;
- int nWidthOffset;
- int nHeightOffset;
- bool bPreviewEnable;
- int nPreviewWidth;
- int nPreviewHeight;
- }Image;
- typedef struct
- {
- int nRefrencePV;
- int nAvgNum;
- int nKV;
- float fMA;
- float fMS;
- string strProcContent;
- }RefrenceCal;
- typedef struct Panel
- {
- int nPanelNumber;
- int nPanelID;
- int nCOMPort;
- int nPanelChannel;
- int nPanelState;
- int nCalibrationMode;
- int nPanelExpWindowMode;
- int nSaturationValue;
- int nSaveRawDataMode;
- int nMiddleFilter;
- int nAutoBadPixel;
- int nFlatImgCheck;
- int nDarkImgCheck;
- int nIPPort;
- int nExpWindow;//
- int nOffsetType; //
- float fTempUpperLimit;
- float fTempMaxLimit;
- float fTempLowerLimit;
- int nSyncMode;
- int nStandardEXI;
- int nHighPowerTimeOut;
- int nGridSuppress;
- int nDoseOfEXI;
- int nReserved1;
- int nReserved2;
- int nReserved3;
- int nReadImageFromLocal;
- string strPanelType;
- string strDemoImage;
- string strLastCalibrationDate;
- string strPanelFileName;
- string strIPAddress;
- string strPanelSerial;
- Image ImageStruct;
- string PixelSpacing;
- string ActiveDimension;
- string DetectorActiveTime;
- string DetectorActivationOffsetFromExposure;
- string FieldofViewShape;
- string ViewDimension;
- string DetectorType;
- string DetectorConfiguration;
- string strTimeofLastDetectorCalibration;
- string ConditionsNominalFlag;
- string Sensitivity;
- string DetectorElementPhysicalSize;
- string DetectorElementSpacing;
- string DetectorActiveShape;
- string DetectorActiveDimension;
- string DetectorActiveOrigin;
- string LossyImageCompression;
- string RescaleType;
- string PixelIntensityRelationship;
- string ImageReferUGY;
- string UGYShowType;
- string FactorEXI2UGY;
- Panel()
- {
- nPanelNumber = 0;
- nPanelID = 0;
- nCOMPort = 0;
- nPanelChannel = 0;
- nPanelState = 0;
- nCalibrationMode = 0;
- nPanelExpWindowMode = 0;
- nSaturationValue = 0;
- nSaveRawDataMode = 0;
- nMiddleFilter = 0;
- nAutoBadPixel = 0;
- nFlatImgCheck = 0;
- nDarkImgCheck = 0;
- nIPPort = 0;
- nExpWindow = 0;
- nGridSuppress = 0;
- fTempUpperLimit = 0.0f;
- fTempMaxLimit = 0.0f;
- fTempLowerLimit = 0.0f;
- nReserved1 = 0;
- nReserved2 = 0;
- nReserved3 = 0;
- nSyncMode = 0;
- nStandardEXI = 0;
- nDoseOfEXI = 0;
- nHighPowerTimeOut = 0;
- strPanelType = "";
- strDemoImage = "";
- strLastCalibrationDate = "";
- strPanelFileName ="";
- strIPAddress = "";
- strPanelSerial = "";
- nReadImageFromLocal = 1;
- //memset(ImageStruct, 0, sizeof(Image));
- //memset(vecRefrenceCal, 0, sizeof(vector<RefrenceCal>));
- PixelSpacing = "";
- ActiveDimension = "";
- DetectorActiveTime = "";
- DetectorActivationOffsetFromExposure = "";
- FieldofViewShape = "";
- ViewDimension = "";
- DetectorType = "";
- DetectorConfiguration = "";
- strTimeofLastDetectorCalibration = "";
- ConditionsNominalFlag = "";
- Sensitivity = "";
- DetectorElementPhysicalSize = "";
- DetectorElementSpacing = "";
- DetectorActiveShape = "";
- DetectorActiveDimension = "";
- DetectorActiveOrigin = "";
- LossyImageCompression = "";
- RescaleType = "";
- PixelIntensityRelationship = "";
- ImageReferUGY = "";
- UGYShowType = "";
- FactorEXI2UGY = "";
- }
- Panel& operator =(const Panel &panel)
- {
- nPanelNumber = panel.nPanelNumber;
- nPanelID = panel.nPanelID;
- nCOMPort = panel.nCOMPort;
- nPanelChannel = panel.nPanelChannel;
- nPanelState = panel.nPanelState;
- nCalibrationMode = panel.nCalibrationMode;
- nPanelExpWindowMode = panel.nPanelExpWindowMode;
- nSaturationValue = panel.nSaturationValue;
- nSaveRawDataMode = panel.nSaveRawDataMode;
- nMiddleFilter = panel.nMiddleFilter;
- nAutoBadPixel = panel.nAutoBadPixel;
- nFlatImgCheck = panel.nFlatImgCheck;
- nDarkImgCheck = panel.nDarkImgCheck;
- nIPPort = panel.nIPPort;
- nExpWindow = panel.nExpWindow;
- fTempUpperLimit = panel.fTempUpperLimit;
- fTempMaxLimit = panel.fTempMaxLimit;
- fTempLowerLimit = panel.fTempLowerLimit;
- nSyncMode = panel.nSyncMode;
- nStandardEXI = panel.nStandardEXI;
- nDoseOfEXI = panel.nDoseOfEXI;
- nHighPowerTimeOut = panel.nHighPowerTimeOut;
- nReserved1 = panel.nReserved1;
- nReserved2 = panel.nReserved2;
- nReserved3 = panel.nReserved3;
- nGridSuppress = panel.nGridSuppress;
- strPanelType=panel.strPanelType;
- strDemoImage=panel.strDemoImage;
- strLastCalibrationDate=panel.strLastCalibrationDate;
- strPanelFileName=panel.strPanelFileName;
- strIPAddress=panel.strIPAddress;
- strPanelSerial=panel.strPanelSerial;
- nReadImageFromLocal = panel.nReadImageFromLocal;
- ImageStruct = panel.ImageStruct;
- PixelSpacing = panel.PixelSpacing;
- ActiveDimension = panel.ActiveDimension;
- DetectorActiveTime = panel.DetectorActiveTime;
- DetectorActivationOffsetFromExposure = panel.DetectorActivationOffsetFromExposure;
- FieldofViewShape = panel.FieldofViewShape;
- ViewDimension = panel.ViewDimension;
- DetectorType = panel.DetectorType;
- DetectorConfiguration = panel.DetectorConfiguration;
- strTimeofLastDetectorCalibration = panel.strTimeofLastDetectorCalibration;
- ConditionsNominalFlag = panel.ConditionsNominalFlag;
- Sensitivity = panel.Sensitivity;
- DetectorElementPhysicalSize = panel.DetectorElementPhysicalSize;
- DetectorElementSpacing = panel.DetectorElementSpacing;
- DetectorActiveShape = panel.DetectorActiveShape;
- DetectorActiveDimension = panel.DetectorActiveDimension;
- DetectorActiveOrigin = panel.DetectorActiveOrigin;
- LossyImageCompression = panel.LossyImageCompression;
- RescaleType = panel.RescaleType;
- PixelIntensityRelationship = panel.PixelIntensityRelationship;
- ImageReferUGY = panel.ImageReferUGY;
- UGYShowType = panel.UGYShowType;
- FactorEXI2UGY = panel.FactorEXI2UGY;
- return *this;
- }
- }Panel;
- typedef enum FPD_ERR
- {
- FPD_ERR_NONE =0,
- FPD_ERR_INI,
- FPD_ERR_COMMUNICATION,
- FPD_ERR_SLEEP,
- FPD_ERR_DEEP_SLEEP,
- FPD_ERR_SHUTDOWN,
- FPD_ERR_LOST_OFFSET,
- FPD_ERR_LOST_GAIN,
- FPD_ERR_LOST_DEFECT,
- FPD_ERR_LOST_FULL_IMAGE,
- FPD_ERR_LOW_DOSE_IMAGE,
- FPD_RECOVER_IMAGE_FAILED,
- FPD_ERR_NEED_RESET
- };
|