33 #include "dcmtk/config/osconfig.h"
35 #include "dcmtk/dcmimage/dicopxt.h"
36 #include "dcmtk/dcmimgle/dirotat.h"
65 const Uint16 src_cols,
66 const Uint16 src_rows,
67 const Uint16 dest_cols,
68 const Uint16 dest_rows,
71 :
DiColorPixelTemplate<T>(pixel, OFstatic_cast(unsigned long, dest_cols) * OFstatic_cast(unsigned long, dest_rows) * frames),
74 if ((pixel != NULL) && (pixel->
getCount() > 0))
76 if (pixel->
getCount() == OFstatic_cast(
unsigned long, src_cols) * OFstatic_cast(
unsigned long, src_rows) * frames)
77 rotate(OFstatic_cast(
const T **, OFconst_cast(
void *, pixel->
getData())), degree);
79 DCMIMAGE_WARN(
"could not rotate image ... corrupted data");
98 inline void rotate(
const T *pixel[3],
101 if (this->
Init(pixel))
105 else if (degree == 180)
107 else if (degree == 270)
void rotateTopDown(const T *src[], T *dest[])
rotate source image top-down and store result in destination image
Template class to rotate images (on pixel data level).
void rotateRight(const T *src[], T *dest[])
rotate source image right and store result in destination image
DiColorRotateTemplate(const DiColorPixel *pixel, const Uint16 src_cols, const Uint16 src_rows, const Uint16 dest_cols, const Uint16 dest_rows, const Uint32 frames, const int degree)
constructor
void rotate(const T *pixel[3], const int degree)
rotate pixel data
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.
void rotateLeft(const T *src[], T *dest[])
rotate source image left and store result in destination image
Abstract base class to handle color pixel data.
Template class to rotate color images (on pixel data level).
unsigned long getCount() const
get number of pixels
~DiColorRotateTemplate()
destructor
int Init(const void *pixel)
initialize internal memory