/*! * \file BoundingBox.h * \brief * \author Gapchich Vladislav * \date 23/10/11 */ #ifndef __BOUNDINGBOX_H__ #define __BOUNDINGBOX_H__ #include "core/image/CoordT.h" namespace OBJREC { //! \brief Contains category ID, top left and bottom right points of the bounding //! box rectangle. class BoundingBox { public: BoundingBox(); BoundingBox ( const BoundingBox © ); ~BoundingBox(); void setTopLeft ( const NICE::CoordT< int > &aTopLeft ); void setTopLeft ( const int &x, const int &y ); void setBottomRight ( const NICE::CoordT< int > &aBottomRight ); void setBottomRight ( const int &x, const int &y ); void setWidth ( const int &aWidth ); void setHeight ( const int &aHeight ); void setID ( const int &anID ); NICE::CoordT< int > topLeft() const; NICE::CoordT< int > bottomRight() const; int width(); int height(); int id() const; bool isValid() const; void validate(); private: NICE::CoordT< int > top_left_; NICE::CoordT< int > bottom_right_; /// id interpreted as a class label int id_; public: /// unique id that distinguishs this particular bounding box object from all others int unique_id_; }; } //namespace #endif /* __BOUNDINGBOX_H__ */