Synopsis
HxImageRep HxScale (HxImageRep img, double sx, double sy, double sz, HxGeoIntType gi, int adjustSize)
Input
HxImageRep img
double sx
double sy
double sz
HxGeoIntType gi
int adjustSize
Return value
HxImageRep
Description
The function HxScale scales the image, with factors given for each dimension. sx, sy and sz respectively give the scaling factors for the x-, y- and z-direction. sx, sy and sz should be larger or equal to zero, with the restriction that the resulting image should have at least a size 1 for every dimensioni that the input image has.
Pixels in the result image are calculated by interpolating between the placed 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 `0'.
Since the scaled image will normally not have the size of the input image, you can choose to adjust the size of the output image, such that the complete scaled 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. In this case there is either part of the resulting image that remains `empty' (when scaling factors are smaller than 1) or only the top left corner (in case of 2D) of the image appears in the resulting image (when scaling factors are larger than 1).
Remarks
See also
anchor_HxReflect, HxRotate, HxExtend, HxRestrict,
Keywords
Geometric,