ImageAccessT.h 1023 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * NICE-Core - efficient algebra and computer vision methods
  3. * - libimage - An image library
  4. * See file License for license information.
  5. */
  6. #ifndef _LIMUN_BASEIMAGET_H
  7. #define _LIMUN_BASEIMAGET_H
  8. #include <core/image/ImageAccess.h>
  9. namespace NICE {
  10. /**
  11. * @class ImageAccessT
  12. * A generic, but not very efficient single channel image access interface.
  13. * In addition to ImageAccess, this classes provides getPixel() and
  14. * setPixel() using the template parameter as pixel type (instead of int/double).
  15. *
  16. * @author Ferid Bajramovic
  17. */
  18. template <class P>
  19. class ImageAccessT : public ImageAccess {
  20. public:
  21. virtual P getPixelT(int x, int y) const = 0;
  22. virtual void setPixelT(int x, int y, P pixel) = 0;
  23. virtual int getPixelInt(int x, int y) const;
  24. virtual double getPixelFloat(int x, int y) const;
  25. virtual void setPixelInt(int x, int y, int pixel);
  26. virtual void setPixelFloat(int x, int y, double pixel);
  27. };
  28. } // namespace
  29. //#ifdef __GNUC__
  30. #include "core/image/ImageAccessT.tcc"
  31. //#endif
  32. #endif