te::rp::CubeColor Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CubeColor()

te::rp::CubeColor::CubeColor ( int  ir,
int  ig,
int  ib 
)

CubeColor constructor.

Parameters
irRed component of color cube center
igGreen component of color cube center
ibBlue component of color cube center

◆ ~CubeColor()

te::rp::CubeColor::~CubeColor ( )
inline

Destructor.

Definition at line 73 of file PaletteRaster.h.

Member Function Documentation

◆ GroupColorIndex()

int te::rp::CubeColor::GroupColorIndex ( )
inline

Get the index of GroupColor associated with CubeColor.

Returns
the index of CubeColor in the GroupColor.

Definition at line 118 of file PaletteRaster.h.

◆ IndexB()

int te::rp::CubeColor::IndexB ( )
inline

Get blue component of cube center.

Returns
Index of color blue

Definition at line 99 of file PaletteRaster.h.

◆ IndexG()

int te::rp::CubeColor::IndexG ( )
inline

Get green component of cube center.

Returns
Index of color green

Definition at line 93 of file PaletteRaster.h.

◆ IndexR()

int te::rp::CubeColor::IndexR ( )
inline

Get red component of cube center.

Returns
Index of color red

Definition at line 87 of file PaletteRaster.h.

◆ InsertTripleRGB()

void te::rp::CubeColor::InsertTripleRGB ( int  r,
int  g,
int  b 
)

Inserts a triple rgb in CubeColor.

Parameters
rred component of color
ggreen component of color
bblue component of color

◆ Mean()

double te::rp::CubeColor::Mean ( int  i)
inline

Get i-th mean color component value.

Parameters
icolor component ( 0 = red, 1 = green, 2 = blue )
Returns
i-th mean color component value

Definition at line 106 of file PaletteRaster.h.

◆ Pop()

double te::rp::CubeColor::Pop ( )
inline

Get number of Image rgb triples in the CubeColor.

Returns
the population of CubeColor

Definition at line 112 of file PaletteRaster.h.

◆ SetGroupColorIndex()

void te::rp::CubeColor::SetGroupColorIndex ( int  index)
inline

Sets group color index.

Definition at line 123 of file PaletteRaster.h.

Member Data Documentation

◆ m_ibb

int te::rp::CubeColor::m_ibb
protected

Index of color blue in the color cube space.

Definition at line 126 of file PaletteRaster.h.

◆ m_ibg

int te::rp::CubeColor::m_ibg
protected

Index of color green in the color cube space.

Definition at line 126 of file PaletteRaster.h.

◆ m_ibr

int te::rp::CubeColor::m_ibr
protected

Index of color red in the color cube space.

Definition at line 126 of file PaletteRaster.h.

◆ m_igc

int te::rp::CubeColor::m_igc
protected

Index of GroupColor associated with CubeColor.

Definition at line 129 of file PaletteRaster.h.

◆ m_mean

double te::rp::CubeColor::m_mean[3]
protected

Mean of triples from an Image rgb belonging to this CubeColor.

Definition at line 130 of file PaletteRaster.h.

◆ m_pop

double te::rp::CubeColor::m_pop
protected

Number of Image rgb triples in the CubeColor.

Definition at line 131 of file PaletteRaster.h.


The documentation for this class was generated from the following file: