DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Public Member Functions | Private Attributes | List of all members
DcmQuantHistogramItem Class Reference

this class extends DcmQuantPixel by an integer value which is used for various purposes. More...

Inheritance diagram for DcmQuantHistogramItem:

## Public Member Functions
| DcmQuantHistogramItem (const DcmQuantPixel &colorP, int val)
| constructor More...
| DcmQuantHistogramItem ()
| default constructor
OFBool | equals (const DcmQuantPixel &colorP) const
| compares the stored pixel value with the given pixel. More...
int | getValue () const
| returns the integer value maintained by this object
void | setValue (int v)
| assigns a new integer value to this object More...
void | incValue ()
| increases the integer value maintained by this object by one
Public Member Functions inherited from DcmQuantPixel
| DcmQuantPixel ()
| default constructor, creates black pixel
| DcmQuantPixel (const DcmQuantPixel &arg)
| copy assignment constructor
virtual | ~DcmQuantPixel ()
| destructor
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. More...
unsigned long | hash () const
| this method computes an unsigned long hash value for the current pixel. More...
DcmQuantComponent | getRed () const
| returns the red component More...
DcmQuantComponent | getGreen () const
| returns the green component More...
DcmQuantComponent | getBlue () const
| returns the blue component More...
void | assign (DcmQuantComponent r, DcmQuantComponent g, DcmQuantComponent b)
| assigns new R, G and B values to this pixel More...
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. More...

## Private Attributes
int | value
| integer value assigned to this pixel. More...

## Detailed Description

this class extends DcmQuantPixel by an integer value which is used for various purposes.

The class is used as a helper class during computation of an image histogram, as a member of a color LUT and as a member of a color hash table.

## Constructor & Destructor Documentation

## ◆ DcmQuantHistogramItem()

DcmQuantHistogramItem::DcmQuantHistogramItem | ( | const DcmQuantPixel & | colorP,
|  | int | val
| ) |  |
| inline

constructor

Parameters

  colorP | pixel value
  val | initial value

## Member Function Documentation

## ◆ equals()

OFBool DcmQuantHistogramItem::equals | ( | const DcmQuantPixel & | colorP | ) | const
| inline

compares the stored pixel value with the given pixel.

Parameters

  colorP | pixel to compare with

Returns
  true if pixel values are equal, false otherwise

## ◆ setValue()

void DcmQuantHistogramItem::setValue | ( | int | v | ) |
| inline

assigns a new integer value to this object

Parameters

  v | new value

## Member Data Documentation

## ◆ value

int DcmQuantHistogramItem::value
| private

integer value assigned to this pixel.

This value is used for different purposes. During computation of a histogram it is used as a counter that counts the instances of the current color. In a color hash table, it contains the index value from the color LUT assigned to this color. In a color LUT, it is the cluster value, i.e. the radius in which all color are guaranteed to be mapped to this palette color.

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

- dcmimage/include/dcmtk/dcmimage/diqthitm.h

Generated on Mon Dec 15 2025 for DCMTK Version 3.7.0 by Doxygen 1.9.1