PlaqueInterface.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef _Plaque_interface_h_
  2. #define _Plaque_interface_h_
  3. #include "../Pattern/Singleton.h"
  4. #include "../Container/ExtendedImage.h"
  5. #include "../Object/point.h"
  6. #include <string>
  7. #include "CPlaqueResult.h"
  8. class PlaqueInterface : public Singleton< PlaqueInterface >
  9. {
  10. public:
  11. bool initialize( std::string fileName, double pixelSizeX = -1.0, double pixelSizeY = -1.0 );
  12. bool initialize( const char* buffer, int width, int height, int bpp, bool upsideDown, double pixelSizeX, double pixelSizeY );
  13. int OnLButtonUp( int x, int y, CPlaqueResult* result );
  14. int computePlaque( int x, int y, int nbPts, unsigned char *points, CPlaqueResult* result, int seuil1, int seuil2 );
  15. int fonctionDebug( CPlaqueResult* result );
  16. int CalculerPlaqueManuelle( int nbPts, unsigned char *points,CPlaqueResult* result );
  17. float getDistanceToFirstPoint( int x, int y, int x0, int y0 );
  18. int getImageWidth();
  19. int getImageHeight();
  20. int getImageBitsPerPixel();
  21. char* getPixelArray();
  22. Point m_p0;
  23. protected:
  24. PlaqueInterface();
  25. friend class Singleton< PlaqueInterface >;
  26. private:
  27. ExtendedImage m_image;
  28. };
  29. #endif