|
| | PixelRef () |
| | Empty constructor, create a null pixel ref with 0 length. More...
|
| |
| bool | isNull () const |
| | returs whether this instance is null (created with the empty constructor) More...
|
| |
| | PixelRef (int x, int y, int width, std::vector< utils::SmartArray< T > > &data) |
| | single constructor to create a pixelref instance More...
|
| |
| | PixelRef (const PixelRef &other) |
| | PixelRef copy constructor (copies the reference, not the values) More...
|
| |
| PixelRef & | operator= (const PixelRef &other) |
| | assignment operator which copies the values (most common) More...
|
| |
| PixelRef & | operator= (const std::vector< T > &vec) |
| | assigns reference pixel values from vector data More...
|
| |
| template<class MT , unsigned int COLS, unsigned int ROWS> |
| PixelRef & | operator= (const math::FixedMatrix< MT, COLS, ROWS > &mat) |
| | assigns reference pixel values from FixedMatrix data More...
|
| |
| std::vector< T > | asVec () const |
| | copies image data into a std::vector More...
|
| |
| void | set (const T &v0) |
| | sets up the first index (unsafe) More...
|
| |
| void | set (const T &v0, const T &v1) |
| | sets up the first two indices (unsafe) More...
|
| |
| void | set (const T &v0, const T &v1, const T &v2) |
| | sets up the first three indices (unsafe) More...
|
| |
| void | set (const T &v0, const T &v1, const T &v2, const T &v3) |
| | sets up the first four indices (unsafe) More...
|
| |
| template<class ForwardIterator > |
| void | setFromRange (ForwardIterator begin, ForwardIterator end) |
| | assigns a ranges contents to the pixel data More...
|
| |
| T & | operator[] (unsigned int channel) |
| | references a single element (safe) More...
|
| |
| const T & | operator[] (unsigned int channel) const |
| | references a single element (const) (safe) More...
|
| |
| int | getChannels () const |
| | returns the channel count More...
|
| |
template<class T>
class icl::core::PixelRef< T >
Pixel-Type class for copying image pixles to image pixels.
PixelRef instances are returned by an images operator()(int x, int y) It allows to write: Img8u a = ...; Img8u b = ...;
a(5,6) = b(3,2); Furthermore it provides a list of setter functions, which allow to set up image pixels form other data types like vectors, ranges (iterator based) and even icl::FixedMatrix.
Most of the functions are channel count save, i.e. they throw an ICLException if source channel count is not compatible.
template<class T >
template<class MT , unsigned int COLS, unsigned int ROWS>
assigns reference pixel values from FixedMatrix data
This can e.g. be used to assign an icl::Color value to an image pixel (Color is a part of the ICLCore package, and it is typedef'ed to some FixedMatrix type)
imageA(x,y) = Color(2,3,4);