ImageAccess.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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_BASEIMAGE_H
  7. #define _LIMUN_BASEIMAGE_H
  8. #include <core/image/MultiChannelImageAccess.h>
  9. namespace NICE {
  10. /**
  11. * A generic, but not very efficient single channel image access interface.
  12. * Also provides MultiChannelImageAccess with channels() == 1.
  13. *
  14. * @author Ferid Bajramovic
  15. */
  16. class ImageAccess : public MultiChannelImageAccess {
  17. public:
  18. virtual int getPixelInt(int x, int y) const = 0;
  19. virtual double getPixelFloat(int x, int y) const = 0;
  20. virtual void setPixelInt(int x, int y, int pixel) = 0;
  21. virtual void setPixelFloat(int x, int y, double pixel) = 0;
  22. virtual int channels() const;
  23. virtual int getPixelInt(int x, int y, int channel) const;
  24. virtual double getPixelFloat(int x, int y, int channel) const;
  25. virtual void setPixelInt(int x, int y, int channel, int pixel);
  26. virtual void setPixelFloat(int x, int y, int channel, double pixel);
  27. };
  28. } // namespace
  29. #endif