Defines a cubic volume in the RGB color space. More...
#include <PaletteRaster.h>
Public Member Functions | |
CubeColor (int ir, int ig, int ib) | |
CubeColor constructor. More... | |
int | GroupColorIndex () |
Get the index of GroupColor associated with CubeColor. More... | |
int | IndexB () |
Get blue component of cube center. More... | |
int | IndexG () |
Get green component of cube center. More... | |
int | IndexR () |
Get red component of cube center. More... | |
void | InsertTripleRGB (int r, int g, int b) |
Inserts a triple rgb in CubeColor. More... | |
double | Mean (int i) |
Get i-th mean color component value. More... | |
double | Pop () |
Get number of Image rgb triples in the CubeColor. More... | |
void | SetGroupColorIndex (int index) |
Sets group color index. More... | |
~CubeColor () | |
Destructor. More... | |
Protected Attributes | |
int | m_ibb |
Index of color blue in the color cube space. More... | |
int | m_ibg |
Index of color green in the color cube space. More... | |
int | m_ibr |
Index of color red in the color cube space. More... | |
int | m_igc |
Index of GroupColor associated with CubeColor. More... | |
double | m_mean [3] |
Mean of triples from an Image rgb belonging to this CubeColor. More... | |
double | m_pop |
Number of Image rgb triples in the CubeColor. More... | |
Defines a cubic volume in the RGB color space.
The class CubeColor defines a cube of size CUBESIZE (=8) centered in a given point in RGB color space. It allows the insertion of RGB triplets, calculation of the mean color value (per color) of triplets inserted and keeping control of population of inserted colors as well. from Spring code
Definition at line 58 of file PaletteRaster.h.
te::rp::CubeColor::CubeColor | ( | int | ir, |
int | ig, | ||
int | ib | ||
) |
CubeColor constructor.
ir | Red component of color cube center |
ig | Green component of color cube center |
ib | Blue component of color cube center |
|
inline |
Destructor.
Definition at line 73 of file PaletteRaster.h.
|
inline |
Get the index of GroupColor associated with CubeColor.
Definition at line 118 of file PaletteRaster.h.
|
inline |
Get blue component of cube center.
Definition at line 99 of file PaletteRaster.h.
|
inline |
Get green component of cube center.
Definition at line 93 of file PaletteRaster.h.
|
inline |
Get red component of cube center.
Definition at line 87 of file PaletteRaster.h.
void te::rp::CubeColor::InsertTripleRGB | ( | int | r, |
int | g, | ||
int | b | ||
) |
Inserts a triple rgb in CubeColor.
r | red component of color |
g | green component of color |
b | blue component of color |
|
inline |
Get i-th mean color component value.
i | color component ( 0 = red, 1 = green, 2 = blue ) |
Definition at line 106 of file PaletteRaster.h.
|
inline |
Get number of Image rgb triples in the CubeColor.
Definition at line 112 of file PaletteRaster.h.
|
inline |
Sets group color index.
Definition at line 123 of file PaletteRaster.h.
|
protected |
Index of color blue in the color cube space.
Definition at line 126 of file PaletteRaster.h.
|
protected |
Index of color green in the color cube space.
Definition at line 126 of file PaletteRaster.h.
|
protected |
Index of color red in the color cube space.
Definition at line 126 of file PaletteRaster.h.
|
protected |
Index of GroupColor associated with CubeColor.
Definition at line 129 of file PaletteRaster.h.
|
protected |
Mean of triples from an Image rgb belonging to this CubeColor.
Definition at line 130 of file PaletteRaster.h.
|
protected |
Number of Image rgb triples in the CubeColor.
Definition at line 131 of file PaletteRaster.h.