Inheritance diagram for DcmQuantPixel:
Public Member Functions | |
DcmQuantPixel () | |
default constructor, creates black pixel | |
DcmQuantPixel (const DcmQuantPixel &arg) | |
copy assignment constructor | |
OFBool | operator== (const DcmQuantPixel &src) const |
comparison operator for equality | |
double | luminance () const |
this method computes the luminance of the current pixel according to the NTSC formula. | |
unsigned long | hash () const |
this method computes an unsigned long hash value for the current pixel. | |
DcmQuantComponent | getRed () const |
returns the red component | |
DcmQuantComponent | getGreen () const |
returns the green component | |
DcmQuantComponent | getBlue () const |
returns the blue component | |
void | assign (DcmQuantComponent r, DcmQuantComponent g, DcmQuantComponent b) |
assigns new R, G and B values to this pixel | |
void | scale (DcmQuantComponent r, DcmQuantComponent g, DcmQuantComponent b, const DcmQuantScaleTable &table) |
assigns new R, G and B values to this pixel using the given scale table in which all three values are looked up. | |
Private Attributes | |
DcmQuantComponent | red |
red color component of this pixel | |
DcmQuantComponent | green |
green color component of this pixel | |
DcmQuantComponent | blue |
blue color component of this pixel |
This class is used by the color quantization classes. For efficiency considerations, all methods are declared inline.
Definition at line 48 of file diqtpix.h.
|
assigns new R, G and B values to this pixel
Definition at line 129 of file diqtpix.h. References blue, green, and red. Referenced by DcmQuantFloydSteinberg::adjust(). |
|
returns the blue component
Definition at line 119 of file diqtpix.h. References blue. Referenced by DcmQuantFloydSteinberg::adjust(), DcmQuantColorTable::computeIndex(), DcmQuantColorTable::getBlue(), and DcmQuantFloydSteinberg::propagate(). |
|
returns the green component
Definition at line 111 of file diqtpix.h. References green. Referenced by DcmQuantFloydSteinberg::adjust(), DcmQuantColorTable::computeIndex(), DcmQuantColorTable::getGreen(), and DcmQuantFloydSteinberg::propagate(). |
|
returns the red component
Definition at line 103 of file diqtpix.h. References red. Referenced by DcmQuantFloydSteinberg::adjust(), DcmQuantColorTable::computeIndex(), DcmQuantColorTable::getRed(), and DcmQuantFloydSteinberg::propagate(). |
|
this method computes an unsigned long hash value for the current pixel. The hash algorithm is taken from Jef Poskanzer's ppm utility library. The return value is guaranteed to be < DcmQuantHashSize.
Definition at line 94 of file diqtpix.h. References blue, green, and red. Referenced by DcmQuantColorHashTable::add(), and DcmQuantColorHashTable::lookup(). |
|
this method computes the luminance of the current pixel according to the NTSC formula. The range of the luminance equals the range of the underlying DcmQuantComponent type. However, the luminance is returned as a double.
|
|
assigns new R, G and B values to this pixel using the given scale table in which all three values are looked up.
|