DCMTK Version 3.7.0 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

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

  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

## 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(), 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[]
| ) |  |
| inline protected

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

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

## ◆ rotateLeft() [2/2]

template<class T >

void DiRotateTemplate< T >::rotateLeft | ( | T * | data[] | ) |
| inline private

rotate image left and store result in the same storage area

Parameters

  data | array of pointers to source/destination image pixels

## ◆ rotateRight() [1/2]

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

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

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

## ◆ rotateRight() [2/2]

template<class T >

void DiRotateTemplate< T >::rotateRight | ( | T * | data[] | ) |
| inline private

rotate image right and store result in the same storage area

Parameters

  data | array of pointers to source/destination image pixels

## ◆ rotateTopDown() [1/2]

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

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

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

## ◆ rotateTopDown() [2/2]

template<class T >

void DiRotateTemplate< T >::rotateTopDown | ( | T * | data[] | ) |
| inline private

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

Parameters

  data | array of pointers to source/destination image pixels

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

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

Generated on Mon Dec 15 2025 for DCMTK Version 3.7.0 by Doxygen 1.9.1