33 #include "dcmtk/config/osconfig.h"
35 #include "dcmtk/dcmimage/dicopxt.h"
36 #include "dcmtk/dcmimgle/diinpx.h"
45 template<
class T1,
class T2>
63 const unsigned long planeSize,
67 if ((pixel != NULL) && (this->
Count > 0) && (status == EIS_Normal))
87 const unsigned long planeSize,
90 if (this->
Init(pixel))
97 register const T1 *p = pixel;
111 register const T1 *k;
113 register unsigned long l;
114 register unsigned long i = 0;
118 const unsigned long iStart = i;
120 const T1 *kStart = p + 3 * planeSize;
122 for (
int j = 0; j < 3; ++j)
124 q = this->
Data[j] + iStart;
128 for (l = planeSize, i = iStart; (l != 0) && (i < count); --l, ++i)
129 *(q++) = maxvalue - removeSign(*(p++), offset) - removeSign(*(k++), offset);
139 register unsigned long i;
140 for (i = 0; i < count; ++i)
143 for (j = 0; j < 3; ++j)
144 this->
Data[j][i] = maxvalue - removeSign(*(p++), offset) - removeSign(k, offset);
virtual ~DiCMYKPixelTemplate()
destructor
Interface class to DICOM data management (dcmdata).
T2 * Data[3]
pointer to pixel data (3 components)
int PlanarConfiguration
planar configuration of the original pixel data (0 = color-by-pixel, 1 = color-by-plane) ...
Template class to handle color pixel data.
void convert(const T1 *pixel, const unsigned long planeSize, const int bits)
convert input pixel data to intermediate representation
static unsigned long maxval(const int mv_bits, const unsigned long mv_pos=1)
calculate maximum value which could be stored in the specified number of bits
Template class to handle CMYK pixel data.
unsigned long InputCount
number of pixels in the input buffer
DiCMYKPixelTemplate(const DiDocument *docu, const DiInputPixel *pixel, EI_Status &status, const unsigned long planeSize, const int bits)
constructor
int Init(const void *pixel)
initialize internal memory
unsigned long Count
number of pixels