GetEXI.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*! @file
  2. ********************************************************************************
  3. <PRE>
  4. Copyright (c) E-COM 2009-2017. All rights reserved.
  5. 模块名称: GetEXI.dll
  6. 文件名称: CalWindow.h
  7. 关联文件:
  8. 描述: EXI计算模块头文件,公开V2和V3的调用接口及内部函数。
  9. 注意事项:
  10. 作者: ECOM 陈冠男
  11. 版本: 1.0.0.15
  12. 修改历史:
  13. 2014-02-17 将EXI计算接口移植到底层调用。
  14. 2015-04-01 区分V3接口,并保留原接口,版本向前兼容。
  15. 2015-12-02 修改算法,与新版遮光器识别模块(2.3.1.17以后版本)相匹配
  16. 2017-04-13 格式修改。
  17. </PRE>
  18. *******************************************************************************/
  19. #pragma once
  20. #include <memory.h>
  21. #include <stdio.h>
  22. #ifdef _WIN64
  23. #ifdef _DEBUG
  24. #pragma comment(lib, "GetEXIX64D.lib")
  25. #else
  26. #pragma comment(lib, "GetEXIX64.lib")
  27. #endif
  28. #else
  29. #ifdef _DEBUG
  30. #pragma comment(lib, "GetEXID.lib")
  31. #else
  32. #pragma comment(lib, "GetEXI.lib")
  33. #endif
  34. #endif
  35. #ifndef WORD
  36. typedef unsigned short WORD;
  37. #endif
  38. #ifndef BYTE
  39. typedef unsigned char BYTE;
  40. #endif
  41. extern "C" int __declspec(dllexport) GetEXI( unsigned short* pData,int nWidth,int nHeight,int nLeft,int nRight,int nTop,int nBottom);
  42. extern "C" int __declspec(dllexport) GetEXI4Detector(WORD* pImage, BYTE* pMask, BYTE* pMask1, int nWidth, int nHeight, int ImageBit, int &EXI);
  43. extern "C" int __declspec(dllexport) GetEXI4DetectorForV3P1(WORD* pImage, BYTE* pMask, BYTE* pMask1, int nWidth, int nHeight, int ImageBit, int &EXI);
  44. extern "C" int __declspec(dllexport) GetEXIRF(unsigned short* pImage, int nWidth, int nHeight, int nImageBit, int top, int bottom, int left, int right, int &EXI);
  45. //add by zhaoyiru,20170928
  46. extern "C" int __declspec(dllexport) GetEXI4DetectorForV3P1New(WORD* pImage, BYTE* pMask, BYTE* pMask1, int nWidth, int nHeight, int ImageBit, int &EXI, float &EXI_display, float fCoef);
  47. //EXI:原ECOM EXI
  48. //EXI_display: 西门子显示的EXI
  49. extern "C" int __declspec(dllexport) GetCoef(WORD* pImage, int nWidth, int nHeight, float fTargetEXI, float fTargetDoes, float fSysDoesOrAECDoes, float &fCoef, float &fROIMeanCal);
  50. extern "C" int __declspec(dllexport) GetCenterROIEXI(WORD* pImage, int nWidth, int nHeight, float fCoef, float &fROIMeanCal);
  51. //fTargetEXI: 目标EXI
  52. //fTargetDoes: 目标Does
  53. //例:西门子1uGy要求显示100
  54. //fSysDoesOrAECDoes: 探测器可接受呈像质量Does,或者AEC截止Does.
  55. int OtsuThreshold( int *Hisq, int area, int N );
  56. //add 20180615
  57. // for DR V2
  58. extern "C" int __declspec(dllexport) GetEXIValue(WORD* pImage, float* pDataInfo, float* pData, int nWidth, int nHeight, int ImageBit, int &EXI, float &EXI_display, float fCoef);