BoundingBox.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*!
  2. * \file BoundingBox.h
  3. * \brief
  4. * \author Gapchich Vladislav
  5. * \date 23/10/11
  6. */
  7. #ifndef __BOUNDINGBOX_H__
  8. #define __BOUNDINGBOX_H__
  9. #include "core/image/CoordT.h"
  10. using namespace NICE;
  11. namespace OBJREC {
  12. //! \brief Contains category ID, top left and bottom right points of the bounding
  13. //! box rectangle.
  14. class BoundingBox
  15. {
  16. public:
  17. BoundingBox();
  18. BoundingBox(const BoundingBox &copy);
  19. ~BoundingBox();
  20. void setTopLeft(const CoordT< int > &aTopLeft);
  21. void setTopLeft(const int &x, const int &y);
  22. void setBottomRight(const CoordT< int > &aBottomRight);
  23. void setBottomRight(const int &x, const int &y);
  24. void setWidth(const int &aWidth);
  25. void setHeight(const int &aHeight);
  26. void setID(const int &anID);
  27. CoordT< int > topLeft() const;
  28. CoordT< int > bottomRight() const;
  29. int width();
  30. int height();
  31. int id() const;
  32. bool isValid() const;
  33. void validate();
  34. private:
  35. CoordT< int > top_left_;
  36. CoordT< int > bottom_right_;
  37. int id_;
  38. };
  39. } //namespace
  40. #endif /* __BOUNDINGBOX_H__ */
  41. /*
  42. *
  43. */