|
latest version v1.9 - last update 24 Nov 2005 |
|
ubyte.
More...
#include <ltiRGBPixel.h>
Inheritance diagram for lti::trgbPixel< T >:
Public Types | |
| typedef T | value_type |
| typedef int | size_type |
Public Member Functions | |
| trgbPixel () | |
| trgbPixel (const T g) | |
| trgbPixel (const T r, const T g, const T b) | |
| trgbPixel (const trgbPixel< T > &p) | |
| trgbPixel (const rgbPixel &p) | |
| void | get (T &r, T &g, T &b) const |
| const T & | getRed () const |
| const T & | getGreen () const |
| const T & | getBlue () const |
| void | set (const T r, const T g, const T b) |
| void | setRed (const T r) |
| void | setGreen (const T g) |
| void | setBlue (const T b) |
| T & | at (const int x) |
| const T & | at (const int x) const |
| T & | operator[] (const int x) |
| const T & | operator[] (const int x) const |
| int | size () const |
| trgbPixel< T > & | copy (const trgbPixel< T > &other) |
| trgbPixel< T > & | copy (const rgbPixel &other) |
| trgbPixel< T > & | operator= (const trgbPixel< T > &other) |
| trgbPixel< T > & | operator= (const rgbPixel &other) |
| template<class U> | |
| trgbPixel< T > & | castFrom (const trgbPixel< U > &other) |
| bool | isEqual (const trgbPixel< T > &other) const |
| bool | operator== (const trgbPixel< T > &other) const |
| bool | operator!= (const trgbPixel< T > &other) const |
| bool | operator< (const trgbPixel< T > &other) const |
| bool | operator> (const trgbPixel< T > &other) const |
| trgbPixel< T > & | add (const trgbPixel< T > &other) |
| trgbPixel< T > & | add (const trgbPixel< T > &a, const trgbPixel< T > &b) |
| trgbPixel< T > & | add (const T val) |
| trgbPixel< T > & | operator+= (const trgbPixel< T > &other) |
| trgbPixel< T > | operator+ (const trgbPixel< T > &other) const |
| trgbPixel< T > | addScaled (const T b, const trgbPixel< T > &other) |
| trgbPixel< T > | addScaled (const T a, const trgbPixel< T > &pixa, const T b, const trgbPixel< T > &pixb) |
| trgbPixel< T > | addScaled (const trgbPixel< T > &pixa, const T b, const trgbPixel< T > &pixb) |
| trgbPixel< T > | addScaled (const T a, const T b, const trgbPixel< T > &pixb) |
| trgbPixel< T > & | subtract (const trgbPixel< T > &other) |
| trgbPixel< T > & | subtract (const trgbPixel< T > &a, const trgbPixel< T > &b) |
| trgbPixel< T > & | subtract (const T val) |
| trgbPixel< T > & | operator-= (const trgbPixel< T > &other) |
| trgbPixel< T > | operator- (const trgbPixel< T > &other) const |
| trgbPixel< T > & | multiply (const trgbPixel< T > &other) |
| trgbPixel< T > & | multiply (const trgbPixel< T > &a, const trgbPixel< T > &b) |
| trgbPixel< T > & | multiply (const T c) |
| trgbPixel< T > & | multiply (const trgbPixel< T > &other, const T val) |
| trgbPixel< T > & | operator *= (const trgbPixel< T > &other) |
| trgbPixel< T > | operator * (const trgbPixel< T > &other) const |
| trgbPixel< T > | operator *= (const T other) |
| trgbPixel< T > | operator * (const T c) const |
| trgbPixel< T > & | divide (const T c) |
| trgbPixel< T > | operator/ (const T c) const |
| trgbPixel< T > & | divide (const trgbPixel< T > &other, const T val) |
| trgbPixel< T > & | operator/= (const T c) |
| trgbPixel< T > & | divide (const trgbPixel< T > &c) |
| trgbPixel< T > & | divide (const trgbPixel< T > &a, const trgbPixel< T > &b) |
| trgbPixel< T > | operator/ (const trgbPixel< T > &c) const |
| trgbPixel< T > & | operator/= (const trgbPixel< T > &c) |
| T | absSqr () const |
| T | distanceSqr (const trgbPixel< T > &other) const |
| T | dot (const trgbPixel< T > &other) const |
| rgbPixel | getRGBPixel () const |
| rgbPixel | getClippedRGBPixel () const |
| trgbPixel< T > & | apply (T(*function)(T)) |
| trgbPixel< T > & | apply (T(*function)(const T &)) |
Public Attributes | |
| T | red |
| T | green |
| T | blue |
ubyte.
The type rgbPixel optimize speed and memory use. If you need RGB integer values between 0 and 255, you should use rgbPixel instead (much more efficient!)
|
|||||
|
return type of the size() member
|
|
|||||
|
used for the template-based interface for pixels as vectors.
|
|
|||||||||
|
default constructor
|
|
||||||||||
|
gray value constructor
|
|
||||||||||||||||||||
|
default constructor
|
|
||||||||||
|
copy constructor
|
|
||||||||||
|
copy constructor
|
|
|||||||||
|
obtain the square of the magnitud of this pixel
|
|
||||||||||
|
add a constant to each component of the pixel
|
|
||||||||||||||||
|
Add pixels a and b leave the result here.
|
|
||||||||||
|
add two pixels
|
|
||||||||||||||||||||
|
scale this pixel with a, and add to the result the scaled pixel pixb (scaling factor b), i.e. *this = *this*a + pb*b |
|
||||||||||||||||||||
|
assign to this pixel the sum of the pixel pixa and the scaled pixel pixb (scaling factor b), i.e. *this = pa + pb*b |
|
||||||||||||||||||||||||
|
assign to this pixel the sum of the scaled pixels with their respective scaling factors, i.e. *this = pa*a + pb*b |
|
||||||||||||||||
|
add to this pixel the other pixel scaled by the given constant
|
|
||||||||||
|
apply a C-function to each component of the pixel
|
|
||||||||||
|
apply a C-function to each component of the pixel
|
|
||||||||||
|
Used to simulate read-only vector access. It is slower than the normal access to the elements with getRed() or similar methods. The correspondence between the elements of the vector and the color components will be at(0) for red, at(1) for green and at(2) for blue. |
|
||||||||||
|
Used to simulate vector access. It is slower than the normal access to the elements with getRed() or setRed() similar methods. The correspondence between the elements of the vector and the color components will be at(0) for red, at(1) for green and at(2) for blue. |
|
||||||||||||||
|
convert between pixels of different types
|
|
||||||||||
|
copy member
|
|
||||||||||
|
copy member
|
|
||||||||||
|
returns the square of the distance of this pixel to the other one defined as
|
|
||||||||||||||||
|
Elementwise divide between the elements of a and b.
|
|
||||||||||
|
elementwise divide
|
|
||||||||||||||||
|
divide the elements of the other pixel with the given value, and leave the result here.
|
|
||||||||||
|
divide by a constant
|
|
||||||||||
|
computes the dot product with another pixel, which is define as the sum of the products of all corresponding components, i.e. p1.red*p2.red + p1.green*p2.green + p1.blue*p2.blue, where p1 is this pixel. |
|
||||||||||||||||||||
|
Get the three color components and write them in the given arguments.
|
|
|||||||||
|
returns blue value
|
|
|||||||||
|
return a normal lti::rgbPixel Values lower than 0 are set to 0 and values higher than 255 are set to 255. This method is slower than getRGBPixel() due to the extra comparisons
|
|
|||||||||
|
returns green value
|
|
|||||||||
|
returns red value
|
|
|||||||||
|
return a normal lti::rgbPixel You should ensure that the values are all in a valid interval!
|
|
||||||||||
|
compare member: returns true if this is equal to other
|
|
||||||||||||||||
|
multiply the elements of the other pixel with the given value, and leave the result here.
|
|
||||||||||
|
multiply with a constant
|
|
||||||||||||||||
|
Elementwise multiplication of the elements of a and b.
|
|
||||||||||
|
multiply with another pixel. The pixel multiplication is a elementwise multiplication |
|
||||||||||
|
multiply this pixel with another one without altering anything. .. |
|
||||||||||
|
multiply this pixel with another one without altering anything. .. |
|
||||||||||
|
alias for multiply
|
|
||||||||||
|
alias for multiply The pixel multiplication is a elementwise multiplication
|
|
||||||||||
|
alias for !compare()
|
|
||||||||||
|
add this pixel with the otherone without altering anything. .. |
|
||||||||||
|
alias for add
|
|
||||||||||
|
subtract 'other' from this pixel without altering anything. .. |
|
||||||||||
|
alias for subtract
|
|
||||||||||
|
elementwise divide
|
|
||||||||||
|
divide by a constant
|
|
||||||||||
|
alias for elementwise divide
|
|
||||||||||
|
alias for divide
|
|
||||||||||
|
returns true if the intensity of this color is smaller than the intensity of the other color
|
|
||||||||||
|
alias for copy member
|
|
||||||||||
|
alias for copy member
|
|
||||||||||
|
alias for compare()
|
|
||||||||||
|
returns true if the intensity of this color is bigger than the intensity of the other color
|
|
||||||||||
|
Used to simulate read-only vector access. It is slower than the normal access to the elements with getRed() or similar methods. The correspondence between the elements of the vector and the color components will be [0] for red, [1] for green and [2] for blue. |
|
||||||||||
|
Used to simulate vector access. It is slower than the normal access to the elements with getRed() or setRed() similar methods. The correspondence between the elements of the vector and the color components will be [0] for red, [1] for green and [2] for blue. |
|
||||||||||||||||||||
|
set the red, green, blue values for the pixel
|
|
||||||||||
|
sets blue value
|
|
||||||||||
|
sets green value
|
|
||||||||||
|
sets red value
|
|
|||||||||
|
Used to simulate the vector size.
|
|
||||||||||
|
subtract the given value from each component of the pixel
|
|
||||||||||||||||
|
Subtract pixel b from pixel a and leave the result here.
|
|
||||||||||
|
Subtract the other pixel from the current one and leave the result here.
|
|
|||||
|
blue channel
|
|
|||||
|
green channel
|
|
|||||
|
red channel
|