DCMTK  Version 3.6.6
OFFIS DICOM Toolkit
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
DiRotateTemplate< T > Class Template Reference

Template class to rotate images (on pixel data level). More...

+ Inheritance diagram for DiRotateTemplate< T >:

Public Member Functions

 DiRotateTemplate (DiPixel *pixel, const Uint16 src_cols, const Uint16 src_rows, const Uint16 dest_cols, const Uint16 dest_rows, const Uint32 frames, const int degree)
 constructor. More...
 
 DiRotateTemplate (const int planes, const Uint16 src_cols, const Uint16 src_rows, const Uint16 dest_cols, const Uint16 dest_rows, const Uint32 frames)
 constructor. More...
 
virtual ~DiRotateTemplate ()
 destructor
 
void rotateData (const T *src[], T *dest[], const int degree)
 choose algorithm depending on rotation angle More...
 

Protected Member Functions

void rotateLeft (const T *src[], T *dest[])
 rotate source image left and store result in destination image More...
 
void rotateRight (const T *src[], T *dest[])
 rotate source image right and store result in destination image More...
 
void rotateTopDown (const T *src[], T *dest[])
 rotate source image top-down and store result in destination image More...
 
- Protected Member Functions inherited from DiTransTemplate< T >
 DiTransTemplate (const int planes, const Uint16 src_x, const Uint16 src_y, const Uint16 dest_x, const Uint16 dest_y, const Uint32 frames, const int bits=0)
 constructor More...
 
virtual ~DiTransTemplate ()
 destructor
 
void copyPixel (const T *src[], T *dest[])
 copy pixel data More...
 
void fillPixel (T *dest[], const T value)
 fill pixel data with specified value More...
 
void clearPixel (T *dest[])
 clear pixel data (set values to 0) More...
 

Private Member Functions

void rotateLeft (T *data[])
 rotate image left and store result in the same storage area More...
 
void rotateRight (T *data[])
 rotate image right and store result in the same storage area More...
 
void rotateTopDown (T *data[])
 rotate image top-down and store result in the same storage area More...
 

Additional Inherited Members

- Protected Attributes inherited from DiTransTemplate< T >
int Planes
 number of planes
 
Uint16 Src_X
 width of source image
 
Uint16 Src_Y
 height of source image
 
const Uint16 Dest_X
 width of destination image
 
const Uint16 Dest_Y
 height of destination image
 
const Uint32 Frames
 number of frames
 
const int Bits
 number of bits per plane/pixel
 

Detailed Description

template<class T>
class DiRotateTemplate< T >

Template class to rotate images (on pixel data level).

by steps of 90 degrees

Constructor & Destructor Documentation

◆ DiRotateTemplate() [1/2]

template<class T >
DiRotateTemplate< T >::DiRotateTemplate ( DiPixel pixel,
const Uint16  src_cols,
const Uint16  src_rows,
const Uint16  dest_cols,
const Uint16  dest_rows,
const Uint32  frames,
const int  degree 
)
inline

constructor.

This method is used to rotate an image and store the result in the same storage area.

Parameters
pixelpointer to object where the pixel data are stored
src_colsoriginal width of the image
src_rowsoriginal height of the image
dest_colsnew width of the image
dest_rowsnew height of the image
framesnumber of frames
degreeangle by which the image should be rotated

References DiPixel::getCount(), DiPixel::getPlanes(), and DiTransTemplate< T >::Planes.

◆ DiRotateTemplate() [2/2]

template<class T >
DiRotateTemplate< T >::DiRotateTemplate ( const int  planes,
const Uint16  src_cols,
const Uint16  src_rows,
const Uint16  dest_cols,
const Uint16  dest_rows,
const Uint32  frames 
)
inline

constructor.

This method is used to perform only the preparation and to start rotation later with method 'rotateData()'

Parameters
planesnumber of planes (1 or 3)
src_colsoriginal width of the image
src_rowsoriginal height of the image
dest_colsnew width of the image
dest_rowsnew height of the image
framesnumber of frames

Member Function Documentation

◆ rotateData()

template<class T >
void DiRotateTemplate< T >::rotateData ( const T *  src[],
T *  dest[],
const int  degree 
)
inline

choose algorithm depending on rotation angle

Parameters
srcarray of pointers to source image pixels
destarray of pointers to destination image pixels
degreeangle by which the image should be rotated

References DiTransTemplate< T >::copyPixel(), DiRotateTemplate< T >::rotateLeft(), DiRotateTemplate< T >::rotateRight(), and DiRotateTemplate< T >::rotateTopDown().

◆ rotateLeft() [1/2]

template<class T >
void DiRotateTemplate< T >::rotateLeft ( const T *  src[],
T *  dest[] 
)
inlineprotected

rotate source image left and store result in destination image

Parameters
srcarray of pointers to source image pixels
destarray of pointers to destination image pixels

Referenced by DiColorRotateTemplate< T >::rotate(), DiMonoRotateTemplate< T >::rotate(), and DiRotateTemplate< T >::rotateData().

◆ rotateLeft() [2/2]

template<class T >
void DiRotateTemplate< T >::rotateLeft ( T *  data[])
inlineprivate

rotate image left and store result in the same storage area

Parameters
dataarray of pointers to source/destination image pixels

◆ rotateRight() [1/2]

template<class T >
void DiRotateTemplate< T >::rotateRight ( const T *  src[],
T *  dest[] 
)
inlineprotected

rotate source image right and store result in destination image

Parameters
srcarray of pointers to source image pixels
destarray of pointers to destination image pixels

Referenced by DiColorRotateTemplate< T >::rotate(), DiMonoRotateTemplate< T >::rotate(), and DiRotateTemplate< T >::rotateData().

◆ rotateRight() [2/2]

template<class T >
void DiRotateTemplate< T >::rotateRight ( T *  data[])
inlineprivate

rotate image right and store result in the same storage area

Parameters
dataarray of pointers to source/destination image pixels

◆ rotateTopDown() [1/2]

template<class T >
void DiRotateTemplate< T >::rotateTopDown ( const T *  src[],
T *  dest[] 
)
inlineprotected

rotate source image top-down and store result in destination image

Parameters
srcarray of pointers to source image pixels
destarray of pointers to destination image pixels

Referenced by DiColorRotateTemplate< T >::rotate(), DiMonoRotateTemplate< T >::rotate(), and DiRotateTemplate< T >::rotateData().

◆ rotateTopDown() [2/2]

template<class T >
void DiRotateTemplate< T >::rotateTopDown ( T *  data[])
inlineprivate

rotate image top-down and store result in the same storage area

Parameters
dataarray of pointers to source/destination image pixels

The documentation for this class was generated from the following file:


Generated on Thu Jan 14 2021 for DCMTK Version 3.6.6 by Doxygen 1.8.18