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))
96 register const T1 *p = pixel;
113 register unsigned long l;
114 register unsigned long i = 0;
118 const unsigned long iStart = i;
120 for (
int j = 0; j < 3; ++j)
123 for (l = planeSize, i = iStart; (l != 0) && (i < count); --l, ++i)
124 this->
Data[j][i] = removeSign(*(p++), offset);
131 register unsigned long i;
132 for (i = 0; i < count; ++i)
133 for (j = 0; j < 3; ++j)
134 this->
Data[j][i] = removeSign(*(p++), offset);
Interface class to DICOM data management (dcmdata).
void convert(const T1 *pixel, const unsigned long planeSize, const int bits)
convert input pixel data to intermediate representation
virtual ~DiRGBPixelTemplate()
destructor
DiRGBPixelTemplate(const DiDocument *docu, const DiInputPixel *pixel, EI_Status &status, const unsigned long planeSize, const int bits)
constructor
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.
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 RGB pixel data.
unsigned long InputCount
number of pixels in the input buffer
int Init(const void *pixel)
initialize internal memory
unsigned long Count
number of pixels