Horus Doc || Global Function Guide || General documentation   | Function documentation  

HxRotate

Synopsis

HxImageRep HxRotate (HxImageRep img, double alpha, HxGeoIntType gi = LINEAR, int adjustSize = 1, HxValue background = HxValue(0));

Input

HxImageRep img
The image you want to rotate.

double alpha
The angle you want to rotate the image over. A positive angle stands for a counterclockwise rotation.

HxGeoIntType gi
The type of interpolation that is used by the function. Possible values: NEAREST, LINEAR , see the section on Interpolation.

int adjustSize
This parameter determines whether the resulting image has the same size as the input image (adjustSize = 0) or whether the sizes are adjusted (adjustSize not equal to 0).

HxValue background
The value of that should be given to pixels in the result image that are do not originate from the input image.

Return value

HxImageRep
The rotated image.

Description

The function HxRotate rotates the image over the center of the image, over an angle of alpha degrees. A positive angle stands for a counterclockwise rotation.

Pixels in the result image are calculated by interpolating between the rotated pixels of the input image. The type of interpolation is determined by HxGeoIntType gi, see the section on Interpolation. Pixels in the result image that do not originate from pixels in the input image, will get the value as given by HxValue background.

Since the rotated image will normally not fit its original rectangle, you can choose to adjust the size of the output image, such that the complete rotated version fits in (adjustSize = 1). When adjustSize does not equal 1, the size of the result image will be the same as the input image, as is the scale of the rotated image, resulting in `chopped of corners' in the result image.

Remarks

Valid input images
This function is properly defined for all 2D images.

Valid background values
The background should have the same pixeltype as the pixeltype of the input image.

See also

anchor_HxReflect, HxScale,

Keywords

Geometric,


Generated on Mon Jan 27 15:45:01 2003 for GlobalFunctionGuide by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001