123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- /*! @file
- ********************************************************************************
- <PRE>
- Copyright (c) E-COM 2009-2017.
- All rights reserved.
- MODULE NAME: Collimator
- FILE NAME: CollimatorDetProcess.h
- DESCRIPTION: This file is the header of collimator functions.
- NOTES: Reference 西门子RAD3项目需求的第316项.
- AUTHOR: Chen G.N
- VERSION: 1.2
- HISTORY: 2013-04-28 First version
- </PRE>
- *******************************************************************************/
- #pragma once
- #ifndef FALSE
- #define FALSE 0
- #endif
- #ifndef TRUE
- #define TRUE 1
- #endif
- #ifndef far
- #define far
- #endif
- typedef unsigned char BYTE;
- typedef unsigned short WORD;
- typedef unsigned long DWORD;
- typedef void far *LPVOID;
- #ifdef _WIN64
- #ifdef _DEBUG
- #pragma comment(lib, "CollimatorX64D.lib")
- #else
- #pragma comment(lib, "CollimatorX64.lib")
- #endif
- #else
- #ifdef _DEBUG
- #pragma comment(lib, "CollimatorD.lib")
- #else
- #pragma comment(lib, "Collimator.lib")
- #endif
- #endif
- /*! @function
- ********************************************************************************
- <PRE>
- FUNCTION NAME: GetBeginEnd
- DESCRIPTION: Get the Begin and End of the histogram for image with a mask.
- PARA: [IN] pImage : pointer for the image
- [IN] nWidth : image width
- [IN] nHeight : image height
- [IN] nFlag : image bits
- [IN] nInvert : not used
- [IN] nLeft, nRight, nTop, nBottom: mask boundary
- [IN|OUT] nBegin, nEnd : begin or end of the histogram
- HISTORY: 2013-09-29 First version
- </PRE>
- *******************************************************************************/
- extern "C" bool __declspec(dllexport) GetBeginEnd(int nFlag,int nInvert,
- const unsigned short* pData,int nWidth,int nHeight,
- int nLeft,int nRight,int nTop,int nBottom,int &nBegin,int &nEnd);
- /*! @function
- ********************************************************************************
- <PRE>
- FUNCTION NAME: AutoCrop
- DESCRIPTION: interface of the autocrop.
- PARA: [IN] pImage : pointer for the image
- [IN] nWidth : image width
- [IN] nHeight : image height
- [IN] ImageBit : image bits
- [IN|OUT] leftside, rightside, upside, bottomside: output of the
- boundary
- HISTORY: 2013-09-29 First version
- </PRE>
- *******************************************************************************/
- extern "C" int __declspec(dllexport) AutoCrop( WORD *pIn, int Width, int Height,
- int ImageBit,int &leftside, int &rightside,int &upside, int &bottomside );
- /*! @function
- ********************************************************************************
- <PRE>
- FUNCTION NAME: AutoCropReleaseALLMem
- DESCRIPTION: Memery release function for all InArray and OutArray.
- PARA: [IN|OUT] pInArray : pointer for InArray
- [IN|OUT] pOutArray : pointer for OutArray
- HISTORY: 2013-09-29 First version
- 2016-08-15 Add memery release for AutoCropProcess_polygon
- </PRE>
- *******************************************************************************/
- extern "C" int __declspec(dllexport) AutoCropReleaseALLMem( LPVOID *pInArray,
- LPVOID *pOutArray, int OutFlag );
- /*! @function
- ********************************************************************************
- <PRE>
- FUNCTION NAME: GetALLFunctionNum
- DESCRIPTION: get the number of all functions.
- PARA: [OUT] : number of all functions
- HISTORY: 2013-09-29 First version
- </PRE>
- *******************************************************************************/
- extern "C" int __declspec(dllexport) GetALLFunctionNum();
- /*! @function
- ********************************************************************************
- <PRE>
- FUNCTION NAME: GetALLFunctionNames
- DESCRIPTION: get the name of all functions.
- PARA: [IN|OUT] pFuncNameList : list of the functions' name
- [IN] count : not used
- HISTORY: 2013-09-29 First version
- </PRE>
- *******************************************************************************/
- extern "C" int __declspec(dllexport) GetALLFunctionNames(char** pFuncNameList,
- int count);
- /*! @function
- ********************************************************************************
- <PRE>
- FUNCTION NAME: AutoCropFunctionInfo
- DESCRIPTION: Get the info of autocrop function.
- PARA: [IN|OUT] nInputBufferCount : Input BufferCount
- [IN|OUT] nMicroParamCount : Micro Parameters Count
- [IN|OUT] nOutParamCount : Output Parameters Count
- HISTORY: 2013-09-29 First version
- </PRE>
- *******************************************************************************/
- extern "C" int __declspec(dllexport) AutoCropFunctionInfo(int* nInputBufferCount,
- int* nMicroParamCount, int* nOutParamCount);
- /*! @function
- ********************************************************************************
- <PRE>
- FUNCTION NAME: AutoCropProcess
- DESCRIPTION: interface for DROC V2 device layer.
- REFERENCE: 西门子RAD3项目需求的第316项.
- PARA: [IN|OUT] pInArray : input array
- [IN|OUT] pMicroParam : micro parameters
- [IN] MicroParamNum : number of micro parameters
- [IN|OUT] pOutArray : output array
- [IN] nOutParamNum : number of output parameters
- RETURN: OK : return 0; others : return error code
- HISTORY: 2016-07-09 First version
- </PRE>
- *******************************************************************************/
- extern "C" int __declspec(dllexport) AutoCropProcess( LPVOID *pInArray,
- float* pMicroParam, int MicroParamNum, LPVOID *pOutArray, int nOutParamNum );
- /*! @function
- ********************************************************************************
- <PRE>
- FUNCTION NAME: AutoCropForNDT
- DESCRIPTION: AutoCrop function for NDT use.
- PARA: [IN] pImage : pointer for the image
- [IN] nWidth : image width
- [IN] nHeight : image height
- [IN] ImageBit : image bits
- [IN|OUT] leftside, rightside, upside, bottomside: output of the
- boundary
- HISTORY: 2013-09-29 First version
- </PRE>
- *******************************************************************************/
- extern "C" int __declspec(dllexport) AutoCropForNDT( WORD *pImage, int nWidth,
- int nHeight, int ImageBit,int &leftside, int &rightside,int &upside,
- int &bottomside );
- /*! @function
- ********************************************************************************
- <PRE>
- FUNCTION NAME: AutoCropProcess_v3
- DESCRIPTION: new interface for DROC V3 device layer.
- REFERENCE: 西门子RAD3项目需求的第316项.
- PARA: [IN|OUT] pInArray : input array
- [IN|OUT] pMicroParam : micro parameters
- [IN] MicroParamNum : number of micro parameters
- [IN|OUT] pOutArray : output array
- [IN] nOutParamNum : number of output parameters
- RETURN: OK : return 0; others : return error code
- HISTORY: 2017-03-09 First version
- </PRE>
- *******************************************************************************/
- extern "C" int __declspec(dllexport) AutoCropProcess_v3( LPVOID *pInArray,
- float* pMicroParam, int MicroParamNum, LPVOID *pOutArray, int nOutParamNum );
|