DCMTK  Version 3.6.6
OFFIS DICOM Toolkit
Static Public Member Functions | List of all members
DcmQuantColorMapping< T1, T2 > Class Template Reference

template class that maps a color image into a palette color image with given color palette. More...

Static Public Member Functions

static void create (DicomImage &sourceImage, unsigned long frameNumber, unsigned long maxval, DcmQuantColorHashTable &cht, DcmQuantColorTable &colormap, T1 &fs, T2 *tp)
 converts a single frame of a color image into a palette color image. More...
 

Detailed Description

template<class T1, class T2>
class DcmQuantColorMapping< T1, T2 >

template class that maps a color image into a palette color image with given color palette.

The two template parameters define the error diffusion class used to implement e.g. Floyd-Steinberg error diffusion and the output type of the color index values, which may be 8 bit or 16 bit unsigned integers.

Member Function Documentation

◆ create()

template<class T1 , class T2 >
static void DcmQuantColorMapping< T1, T2 >::create ( DicomImage sourceImage,
unsigned long  frameNumber,
unsigned long  maxval,
DcmQuantColorHashTable cht,
DcmQuantColorTable colormap,
T1 &  fs,
T2 *  tp 
)
inlinestatic

converts a single frame of a color image into a palette color image.

Parameters
sourceImagecolor image
frameNumbernumber of frame (in sourceImage) that is converted
maxvalmaximum pixel value to which all color samples were down-sampled during computation of the histogram on which the color LUT is based. This value is required to make sure that the hash table doesn't get too large.
chtcolor hash table. This table is passed by the caller since the same hash table can be used if multiple frames are converted. Initially (i.e. when called for the first frame) the hash table is empty.
colormapcolor LUT to which the color image is mapped.
fserror diffusion object, e.g. an instance of class DcmQuantIdent or class DcmQuantFloydSteinberg, depending on the template instantiation.
tppointer to an array to which the palette color image data is written. The array must be large enough to store sourceImage.getWidth() times sourceImage.getHeight() values of type T2.

References DicomImage::getHeight(), and DicomImage::getWidth().


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


Generated on Thu Jan 14 2021 for DCMTK Version 3.6.6 by Doxygen 1.8.18