DllInterface.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef _DllInterface_h_
  2. #define _DllInterface_h_
  3. #include <PlaqueResult.h>
  4. #include <atlimage.h>
  5. #include <vector>
  6. typedef BOOL (*dll_initializeFromFile) ( const char*, double, double );
  7. typedef BOOL (*dll_initializeFromRaw) ( const char*, int, int, int, BOOL, double, double );
  8. typedef int (*dll_onLButtonUp)( int, int, plaque::PlaqueResult* );
  9. typedef int (*dll_computePlaque)( int, int, int, unsigned char*, plaque::PlaqueResult*, int, int );
  10. typedef int (*dll_fonctionDebug)( plaque::PlaqueResult* );
  11. typedef int (*dll_CalculerPlaqueManuelle)(int, unsigned char*, plaque::PlaqueResult* );
  12. typedef float (*dll_getDistanceToFirstPoint)( int, int, int, int );
  13. typedef int (*dll_getImageWidth)();
  14. typedef int (*dll_getImageHeight)();
  15. typedef int (*dll_getImageBitsPerPixel)();
  16. typedef char* (*dll_getPixelArray)();
  17. class DllInterface
  18. {
  19. public:
  20. DllInterface();
  21. virtual ~DllInterface();
  22. BOOL IsValid();
  23. void Clear();
  24. plaque::PlaqueResult* GetResult();
  25. BOOL initializeFromFile( const char*, double mmPerPixelX = -1.0, double mmPerPixelY = -1.0 );
  26. int OnLButtonUp( int, int );
  27. int computePlaque(int, int, int, unsigned char*, int, int);
  28. int fonctionDebug( );
  29. int CalculerPlaqueManuelle(int, unsigned char*);
  30. dll_initializeFromRaw initializeFromRaw;
  31. dll_getDistanceToFirstPoint getDistanceToFirstPoint;
  32. dll_getImageWidth getImageWidth;
  33. dll_getImageHeight getImageHeight;
  34. dll_getImageBitsPerPixel getImageBitsPerPixel;
  35. dll_getPixelArray getPixelArray;
  36. private:
  37. void Initialize();
  38. dll_initializeFromFile m_initializeFromFile;
  39. dll_onLButtonUp m_onLButtonUp;
  40. dll_computePlaque m_computePlaque;
  41. dll_fonctionDebug m_fonctionDebug;
  42. dll_CalculerPlaqueManuelle m_CalculerPlaqueManuelle;
  43. HMODULE hDLL;
  44. BOOL m_isValid;
  45. public:
  46. plaque::PlaqueResult plaqueResult;
  47. };
  48. #endif