|
DCMTK Version 3.6.9
OFFIS DICOM Toolkit
|
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 | |
Template class to rotate images (on pixel data level).
by steps of 90 degrees
|
inline |
constructor.
This method is used to rotate an image and store the result in the same storage area.
| 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().
|
inline |
constructor.
This method is used to perform only the preparation and to start rotation later with method 'rotateData()'
| 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().
|
inline |
choose algorithm depending on rotation angle
| 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().
|
inlineprotected |
rotate source image left and store result in destination image
| 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().
|
inlineprivate |
rotate image left and store result in the same storage area
| 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.
|
inlineprotected |
rotate source image right and store result in destination image
| 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().
|
inlineprivate |
rotate image right and store result in the same storage area
| 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.
|
inlineprotected |
rotate source image top-down and store result in destination image
| 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().
|
inlineprivate |
rotate image top-down and store result in the same storage area
| 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.