RGBA templated pixel type.
More...
#include <pixelTypes.hpp>
|
| | Rgba (const T red, const T green, const T blue, const T alpha=T(1)) |
| | Full constructor. More...
|
| |
| | Rgba (const Base &val) |
| | Copy constructor from internal data. More...
|
| |
| | Rgba (const T val) |
| | RGBA constructor with default alpha value to 1. More...
|
| |
| | Rgba () |
| | Default RGBA constructor set all channels to zero (including the alpha channel) More...
|
| |
| | Rgba (const RGBColor &val, const T alpha) |
| | Copy constructor. More...
|
| |
| const T & | r () const |
| | Get readonly Red channel value. More...
|
| |
| T & | r () |
| | Get rw Red channel value. More...
|
| |
| const T & | g () const |
| | Get readonly Green channel value. More...
|
| |
| T & | g () |
| | Get rw Green channel value. More...
|
| |
| const T & | b () const |
| | Get readonly Blue channel value. More...
|
| |
| T & | b () |
| | Get rw Blue channel value. More...
|
| |
| const T & | a () const |
| | Get readonly Alpha channel value. More...
|
| |
| T & | a () |
| | Get rw Alpha channel value. More...
|
| |
| | operator T () const |
| | Get approximate Gray value using rec601 Luma conversion. More...
|
| |
| template<class Z > |
| Rgba | operator/ (const Z &val) const |
| | scalar division More...
|
| |
| template<class Z > |
| Rgba | operator* (const Z &val) const |
| | scalar multiplication More...
|
| |
| Rgba | operator+ (const Rgba &other) const |
| | Elementwise addition. More...
|
| |
template<typename T>
class aliceVision::image::Rgba< T >
RGBA templated pixel type.
◆ Rgba() [1/5]
Full constructor.
- Parameters
-
| red | Red component value |
| green | Green component value |
| blue | component value |
| alpha | component value |
◆ Rgba() [2/5]
Copy constructor from internal data.
- Parameters
-
◆ Rgba() [3/5]
RGBA constructor with default alpha value to 1.
- Parameters
-
| val | Value to set in each RGB component |
- Note
- This is equivalent to RGBA( val , val , val , 1 )
◆ Rgba() [4/5]
Default RGBA constructor set all channels to zero (including the alpha channel)
- Warning
- The alpha channel is initialized to 0. It is used in generic/templated code like "sampler" which creates an empty color and accumulate color contributions.
◆ Rgba() [5/5]
Copy constructor.
- Parameters
-
◆ a() [1/2]
Get rw Alpha channel value.
- Returns
- Alpha channel value
◆ a() [2/2]
Get readonly Alpha channel value.
- Returns
- Alpha channel value
◆ b() [1/2]
Get rw Blue channel value.
- Returns
- Blue channel value
◆ b() [2/2]
Get readonly Blue channel value.
- Returns
- Blue channel value
◆ g() [1/2]
Get rw Green channel value.
- Returns
- Green channel value
◆ g() [2/2]
Get readonly Green channel value.
- Returns
- Green channel value
◆ operator T()
Get approximate Gray value using rec601 Luma conversion.
- Returns
- Luminance value of pixel
◆ operator*()
template<typename T >
template<class Z >
scalar multiplication
- Parameters
-
| val | Scale multiplication factor |
- Returns
- Rgba color after scalar multiplication
- Note
- This does not modify the Rgba value (ie: only return a modified copy)
◆ operator+()
Elementwise addition.
- Parameters
-
| other | the other element to substract |
- Returns
- Rgb color after addition
- Note
- This does not modify the Rgb value (ie: only return a modified copy)
◆ operator/()
template<typename T >
template<class Z >
scalar division
- Parameters
-
- Returns
- Rgba color after scalar division
- Note
- This does not modify the Rgba value (ie: only return a modified copy)
◆ r() [1/2]
Get rw Red channel value.
- Returns
- Red channel value
◆ r() [2/2]
Get readonly Red channel value.
- Returns
- Red channel value
◆ operator<<
template<typename T >
| std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const Rgba< T > & |
col |
|
) |
| |
|
friend |
stream operator
- Parameters
-
| os | Stream in which rgb value is outputted |
| col | Color to store into the stream |
- Returns
- stream after output
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/alicevision/checkouts/latest/src/aliceVision/image/pixelTypes.hpp