33 #include "dcmtk/config/osconfig.h" 34 #include "dcmtk/ofstd/ofbmanip.h" 36 #include "dcmtk/dcmimage/dicopxt.h" 60 const unsigned long fstart,
61 const unsigned long fcount,
62 const unsigned long fsize)
65 if ((pixel != NULL) && (pixel->
getCount() > 0))
67 if ((pixel->
getCount() > fstart * fsize) && (pixel->
getCount() >= (fstart + fcount) * fsize))
68 copy(OFstatic_cast(
const T **, OFconst_cast(
void *, pixel->
getData())), fstart * fsize);
86 inline void copy(
const T *pixel[3],
87 const unsigned long offset)
89 if (this->
Init(pixel))
91 for (
int j = 0; j < 3; j++)
void copy(const T *pixel[3], const unsigned long offset)
copy specified amount of pixel data
Template class to copy color pixel data.
DiColorCopyTemplate(const DiColorPixel *pixel, const unsigned long fstart, const unsigned long fcount, const unsigned long fsize)
constructor
virtual const void * getData() const =0
get pointer to pixel data (abstract).
T * Data[3]
pointer to pixel data (3 components)
Template class to handle color pixel data.
Abstract base class to handle color pixel data.
A template class for bit manipulations.
unsigned long getCount() const
get number of pixels
~DiColorCopyTemplate()
destructor
int Init(const void *pixel)
initialize internal memory