BlockImageAccessT.tcc 912 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * LImUn - Library for ImageT Understanding
  3. * - libimage - An ImageT library
  4. * See file License for license information.
  5. */
  6. #include "core/image/BlockImageAccessT.h"
  7. namespace NICE {
  8. template<class P> int
  9. BlockImageAccessT<P>::width() const {
  10. return this->widthInline();
  11. }
  12. template<class P> int
  13. BlockImageAccessT<P>::height() const {
  14. return this->heightInline();
  15. }
  16. template<class P> P
  17. BlockImageAccessT<P>::getPixelT(int x, int y) const {
  18. return getPixelQuick(x, y);
  19. }
  20. template<class P> void
  21. BlockImageAccessT<P>::setPixelT(int x, int y, P pixel) {
  22. setPixelQuick(x, y, pixel);
  23. }
  24. template <class P>
  25. void BlockImageAccessT<P>::set(const P& value) {
  26. for(int y=0; y<this->height(); ++y) {
  27. const P* end = this->getPixelPointerYEnd(y);
  28. const int inc = this->columnStepsize();
  29. for (P* p = this->getPixelPointerY(y); p != end; p += inc) {
  30. *p = value;
  31. }
  32. }
  33. }
  34. } // namespace