33 #include "dcmtk/config/osconfig.h"
35 #include "dcmtk/dcmimage/dicopxt.h"
36 #include "dcmtk/dcmimgle/diluptab.h"
37 #include "dcmtk/dcmimgle/diinpx.h"
46 template<
class T1,
class T2,
class T3>
66 if ((pixel != NULL) && (this->
Count > 0) && (status == EIS_Normal))
70 status = EIS_InvalidValue;
71 DCMIMAGE_ERROR(
"invalid value for 'PlanarConfiguration' (" << this->
PlanarConfiguration <<
")");
95 if (this->
Init(pixel))
97 register const T1 *p = pixel;
98 register T2 value = 0;
99 register unsigned long i;
104 for (i = 0; i < count; ++i)
106 value = OFstatic_cast(T2, *(p++));
107 for (j = 0; j < 3; ++j)
109 if (value <= palette[j]->getFirstEntry(value))
110 this->
Data[j][i] = OFstatic_cast(T3, palette[j]->getFirstValue());
111 else if (value >= palette[j]->getLastEntry(value))
112 this->
Data[j][i] = OFstatic_cast(T3, palette[j]->getLastValue());
114 this->
Data[j][i] = OFstatic_cast(T3, palette[j]->getValue(value));