OFFIS DCMTK Version 3.6.0
Public Member Functions | Protected Member Functions | Private Member Functions

DiRotateTemplate< T > Class Template Reference

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

Inheritance diagram for DiRotateTemplate< T >:
Inheritance graph
[legend]
Collaboration diagram for DiRotateTemplate< T >:
Collaboration graph
[legend]

List of all members.

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.
 DiRotateTemplate (const int planes, const Uint16 src_cols, const Uint16 src_rows, const Uint16 dest_cols, const Uint16 dest_rows, const Uint32 frames)
 constructor.
virtual ~DiRotateTemplate ()
 destructor
void rotateData (const T *src[], T *dest[], const int degree)
 choose algorithm depending on rotation angle

Protected Member Functions

void rotateLeft (const T *src[], T *dest[])
 rotate source image left and store result in destination image
void rotateRight (const T *src[], T *dest[])
 rotate source image right and store result in destination image
void rotateTopDown (const T *src[], T *dest[])
 rotate source image top-down and store result in destination image

Private Member Functions

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

Detailed Description

template<class T>
class DiRotateTemplate< T >

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

by steps of 90 degrees

Definition at line 48 of file dirotat.h.


Constructor & Destructor Documentation

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

Definition at line 65 of file dirotat.h.

References DiPixel::getCount(), DiPixel::getDataArrayPtr(), DiPixel::getPlanes(), DiTransTemplate< T >::Planes, DiRotateTemplate< T >::rotateLeft(), DiRotateTemplate< T >::rotateRight(), and DiRotateTemplate< T >::rotateTopDown().

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

Definition at line 102 of file dirotat.h.


Member Function Documentation

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

Definition at line 124 of file dirotat.h.

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

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

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

Definition at line 146 of file dirotat.h.

References DiTransTemplate< T >::Dest_X, DiTransTemplate< T >::Dest_Y, DiTransTemplate< T >::Frames, and DiTransTemplate< T >::Planes.

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

template<class T >
void DiRotateTemplate< T >::rotateLeft ( T *  data[]) [inline, private]

rotate image left and store result in the same storage area

Parameters:
dataarray of pointers to source/destination image pixels

Definition at line 250 of file dirotat.h.

References DiTransTemplate< T >::Dest_X, DiTransTemplate< T >::Dest_Y, DiTransTemplate< T >::Frames, and DiTransTemplate< T >::Planes.

template<class T >
void DiRotateTemplate< T >::rotateRight ( T *  data[]) [inline, private]

rotate image right and store result in the same storage area

Parameters:
dataarray of pointers to source/destination image pixels

Definition at line 288 of file dirotat.h.

References DiTransTemplate< T >::Dest_X, DiTransTemplate< T >::Dest_Y, DiTransTemplate< T >::Frames, and DiTransTemplate< T >::Planes.

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

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

Definition at line 183 of file dirotat.h.

References DiTransTemplate< T >::Dest_X, DiTransTemplate< T >::Dest_Y, DiTransTemplate< T >::Frames, and DiTransTemplate< T >::Planes.

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

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

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

Definition at line 220 of file dirotat.h.

References DiTransTemplate< T >::Dest_X, DiTransTemplate< T >::Dest_Y, DiTransTemplate< T >::Frames, and DiTransTemplate< T >::Planes.

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

template<class T >
void DiRotateTemplate< T >::rotateTopDown ( T *  data[]) [inline, private]

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

Parameters:
dataarray of pointers to source/destination image pixels

Definition at line 326 of file dirotat.h.

References DiTransTemplate< T >::Dest_X, DiTransTemplate< T >::Dest_Y, DiTransTemplate< T >::Frames, and DiTransTemplate< T >::Planes.


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


Generated on Mon Feb 14 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.7.3