34 #include "dcmtk/config/osconfig.h" 35 #include "dcmtk/ofstd/ofcast.h" 36 #include "dcmtk/dcmimage/diqttype.h" 38 #define INCLUDE_CSTDLIB 39 #define INCLUDE_CASSERT 40 #include "dcmtk/ofstd/ofstdinc.h" 71 inline DcmQuantComponent
operator[](
unsigned int idx)
const 84 unsigned long oldmaxval,
85 unsigned long newmaxval)
89 table =
new DcmQuantComponent[oldmaxval+1];
92 numEntries = OFstatic_cast(
unsigned int, oldmaxval) + 1;
94 table[i] = OFstatic_cast(DcmQuantComponent, (OFstatic_cast(
unsigned long, i) * newmaxval + oldmaxval/2) / oldmaxval);
DcmQuantComponent operator[](unsigned int idx) const
array look-up operation.
DcmQuantScaleTable & operator=(const DcmQuantScaleTable &src)
private undefined copy assignment operator
this is a helper class used for temporarily reducing the image bit depth during calculation of an ima...
unsigned int numEntries
number of entries in array
~DcmQuantScaleTable()
destructor
void createTable(unsigned long oldmaxval, unsigned long newmaxval)
initializes the look-up table.
DcmQuantComponent * table
array of pixel values
DcmQuantScaleTable()
constructor
void cleanup()
resets the object to the default-constructed state