34 #include "dcmtk/config/osconfig.h" 35 #include "dcmtk/ofstd/oftypes.h" 36 #include "dcmtk/dcmimage/diqttype.h" 37 #include "dcmtk/dcmimage/diqtstab.h" 90 inline unsigned long hash()
const 92 return ((OFstatic_cast(
unsigned long,
red) * 33023UL + OFstatic_cast(
unsigned long,
green) * 30013UL +
93 OFstatic_cast(
unsigned long,
blue) * 27011UL) & 0x7fffffffUL) % DcmQuantHashSize;
99 inline DcmQuantComponent
getRed()
const objects of this class represent individual RGB pixels.
DcmQuantComponent getBlue() const
returns the blue component
this is a helper class used for temporarily reducing the image bit depth during calculation of an ima...
void assign(DcmQuantComponent r, DcmQuantComponent g, DcmQuantComponent b)
assigns new R, G and B values to this pixel
OFBool operator==(const DcmQuantPixel &src) const
comparison operator for equality
DcmQuantComponent getGreen() const
returns the green component
DcmQuantPixel(const DcmQuantPixel &arg)
copy assignment constructor
unsigned long hash() const
this method computes an unsigned long hash value for the current pixel.
DcmQuantComponent getRed() const
returns the red component
DcmQuantPixel()
default constructor, creates black pixel
double luminance() const
this method computes the luminance of the current pixel according to the NTSC formula.
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...
DcmQuantComponent green
green color component of this pixel
DcmQuantComponent blue
blue color component of this pixel
DcmQuantComponent red
red color component of this pixel