DCMTK: DiRotateTemplate< T > Class Template Reference

DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Loading...
Searching...
No Matches
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.
| 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
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
virtual | ~DiTransTemplate ()
| destructor
void | copyPixel (const T *src[], T *dest[])
| copy pixel data
void | fillPixel (T *dest[], const T value)
| fill pixel data with specified value
void | clearPixel (T *dest[])
| clear pixel data (set values to 0)

## 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

## 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

  pixel | pointer to object where the pixel data are stored
  src_cols | original width of the image
  src_rows | original height of the image
  dest_cols | new width of the image
  dest_rows | new height of the image
  frames | number of frames
  degree | angle by which the image should be rotated

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

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

## ◆ 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

  planes | number of planes (1 or 3)
  src_cols | original width of the image
  src_rows | original height of the image
  dest_cols | new width of the image
  dest_rows | new height of the image
  frames | number of frames

References DiTransTemplate< T >::DiTransTemplate().

## 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

  src | array of pointers to source image pixels
  dest | array of pointers to destination image pixels
  degree | angle by which the image should be rotated

References DiTransTemplate< T >::copyPixel(), rotateLeft(), rotateRight(), and 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

  src | array of pointers to source image pixels
  dest | array of pointers to destination image pixels

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

Referenced by DiRotateTemplate(), DiColorRotateTemplate< T >::rotate(), DiMonoRotateTemplate< T >::rotate(), and 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

  data | array of pointers to source/destination image pixels

References OFBitmanipTemplate< T >::copyMem(), DiTransTemplate< T >::Dest_X, DiTransTemplate< T >::Dest_Y, DiTransTemplate< T >::Frames, and DiTransTemplate< T >::Planes.

## ◆ 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

  src | array of pointers to source image pixels
  dest | array of pointers to destination image pixels

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

Referenced by DiRotateTemplate(), DiColorRotateTemplate< T >::rotate(), DiMonoRotateTemplate< T >::rotate(), and 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

  data | array of pointers to source/destination image pixels

References OFBitmanipTemplate< T >::copyMem(), DiTransTemplate< T >::Dest_X, DiTransTemplate< T >::Dest_Y, DiTransTemplate< T >::Frames, and DiTransTemplate< T >::Planes.

## ◆ 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

  src | array of pointers to source image pixels
  dest | array of pointers to destination image pixels

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

Referenced by DiRotateTemplate(), DiColorRotateTemplate< T >::rotate(), DiMonoRotateTemplate< T >::rotate(), and 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

  data | array of pointers to source/destination image pixels

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:

- dcmimgle/include/dcmtk/dcmimgle/dirotat.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.16.1