| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #ifndef _DllInterface_h_
- #define _DllInterface_h_
- #include <EIMResult.h>
- #include <atlimage.h>
- typedef BOOL (*dll_initializeFromFile)( const char*, double, double );
- typedef BOOL (*dll_initializeFromRaw)( const char*, int, int, int, BOOL, double, double );
- typedef BOOL (*dll_setFirstPoint)( int, int );
- typedef float (*dll_getDistanceToFirstPoint)( int, int );
- typedef BOOL (*dll_setSecondPoint)( int, int, imt::IMTResult* );
- typedef int (*dll_getImageWidth)();
- typedef int (*dll_getImageHeight)();
- typedef int (*dll_getImageBitsPerPixel)();
- typedef char* (*dll_getPixelArray)();
- class DllInterface
- {
- public:
- DllInterface();
- virtual ~DllInterface();
- BOOL IsValid();
- void Clear();
- imt::IMTResult* GetResult();
- BOOL initializeFromFile( const char*, double mmPerPixelX = -1.0, double mmPerPixelY = -1.0 );
- BOOL setFirstPoint( CPoint );
- BOOL setSecondPoint( CPoint );
- dll_initializeFromRaw initializeFromRaw;
- dll_getDistanceToFirstPoint getDistanceToFirstPoint;
- dll_getImageWidth getImageWidth;
- dll_getImageHeight getImageHeight;
- dll_getImageBitsPerPixel getImageBitsPerPixel;
- dll_getPixelArray getPixelArray;
- private:
- void Initialize();
- dll_initializeFromFile m_initializeFromFile;
- dll_setFirstPoint m_setFirstPoint;
- dll_setSecondPoint m_setSecondPoint;
- HMODULE hDLL;
- BOOL m_isValid;
- imt::IMTResult eimResult;
- };
- #endif
|