33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/dcmimage/diqttype.h"
35 #include "dcmtk/dcmimgle/dcmimage.h"
36 #include "dcmtk/dcmimage/diqtstab.h"
37 #include "dcmtk/dcmimage/diqtpix.h"
38 #include "dcmtk/dcmimage/diqthash.h"
39 #include "dcmtk/dcmimage/diqtctab.h"
54 template <
class T1,
class T2>
78 unsigned long frameNumber,
85 unsigned long cols = sourceImage.
getWidth();
86 unsigned long rows = sourceImage.
getHeight();
87 const int bits =
sizeof(DcmQuantComponent)*8;
91 long maxval_l = OFstatic_cast(
long, maxval);
93 const DcmQuantComponent *currentpixel;
94 register DcmQuantComponent cr, cg, cb;
98 scaletable.
createTable(OFstatic_cast(DcmQuantComponent, -1), maxval);
100 const void *data = sourceImage.
getOutputData(bits, frameNumber, 0);
103 const DcmQuantComponent *cp = OFstatic_cast(
const DcmQuantComponent *, data);
104 for (
unsigned long row = 0; row < rows; ++row)
106 fs.startRow(col, limitcol);
109 currentpixel = cp + col + col + col;
110 cr = *currentpixel++;
111 cg = *currentpixel++;
113 px.
scale(cr, cg, cb, scaletable);
115 fs.adjust(px, col, maxval_l);
125 fs.propagate(px, colormap.
getPixel(ind), col);
126 tp[col] = OFstatic_cast(T2, ind);
128 }
while ( col != limitcol );