33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/ofstd/ofcast.h"
36 #include "dcmtk/dcmimgle/dimopxt.h"
37 #include "dcmtk/dcmimgle/dirotat.h"
66 const Uint16 src_cols,
67 const Uint16 src_rows,
68 const Uint16 dest_cols,
69 const Uint16 dest_rows,
72 :
DiMonoPixelTemplate<T>(pixel, OFstatic_cast(unsigned long, dest_cols) * OFstatic_cast(unsigned long, dest_rows) * frames),
75 if ((pixel != NULL) && (pixel->
getCount() > 0))
77 if (pixel->
getCount() == OFstatic_cast(
unsigned long, src_cols) * OFstatic_cast(
unsigned long, src_rows) * frames)
80 DCMIMGLE_WARN(
"could not rotate image ... corrupted data");
105 if (this->
Data != NULL)
109 else if (degree == 180)
111 else if (degree == 270)
Template class to handle monochrome pixel data.
void rotateTopDown(const T *src[], T *dest[])
rotate source image top-down and store result in destination image
Abstract base class to handle monochrome pixel data.
DiMonoRotateTemplate(const DiMonoPixel *pixel, const Uint16 src_cols, const Uint16 src_rows, const Uint16 dest_cols, const Uint16 dest_rows, const Uint32 frames, const int degree)
constructor
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
T * Data
pointer to pixel data
void rotate(const T *pixel, const int degree)
rotate pixel data
virtual const void * getData() const =0
get pointer to pixel data (abstract).
void rotateLeft(const T *src[], T *dest[])
rotate source image left and store result in destination image
unsigned long getCount() const
get number of pixels
~DiMonoRotateTemplate()
destructor
Template class to rotate monochrome images (on pixel data level).