CircleT.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * NICE-Core - efficient algebra and computer vision methods
  3. * - libimage - An image/template for new NICE libraries
  4. * See file License for license information.
  5. */
  6. #ifndef _CIRCLE_IMAGE_H
  7. #define _CIRCLE_IMAGE_H
  8. #include <iostream>
  9. #include <core/image/Drawable.h>
  10. #include <core/image/CoordT.h>
  11. #include <core/image/ColorT.h>
  12. namespace NICE {
  13. /**
  14. * A Drawable circle.
  15. */
  16. template<class P>
  17. class CircleT : public Drawable<P>
  18. {
  19. private:
  20. Coord center;
  21. int radius;
  22. protected:
  23. void doDraw(ColorImageT<P> &image, const ColorT<P>& color) const;
  24. void doDraw(ImageT<P> &image, const P& gray) const;
  25. public:
  26. //! Default constructor
  27. CircleT();
  28. CircleT(const Coord &center, const int radius);
  29. CircleT(const Coord &center, const int radius, const ColorT<P>& _defaultColor);
  30. //! Copy-Constructor
  31. /*! \param arg class to copy
  32. */
  33. CircleT(const CircleT<P>& arg);
  34. //! Destructor of CircleT
  35. virtual ~CircleT();
  36. //! Assignment operator
  37. /*! \param ex class to copy
  38. * \return a reference to this class
  39. */
  40. CircleT<P>& operator=(const CircleT<P>& ex);
  41. //! Compare operator
  42. /*! \param ex class to compare
  43. * \return true if class content is equal
  44. */
  45. bool operator==(const CircleT<P>& ex) const;
  46. //! Compare operator
  47. /*! \param ex class to compare
  48. * \return true if class content is not equal
  49. */
  50. bool operator!=(const CircleT<P>& ex) const;
  51. };
  52. typedef CircleT<Ipp8u> Circle;
  53. } // namespace NICE
  54. //#ifdef __GNUC__
  55. #include "core/image/CircleT.tcc"
  56. //#endif
  57. #endif /* _CIRCLE_IMAGE_H */