CImage:GetAxisLabel CImage:GetImageScaleXy

CImage:GetImageScale


The GetImageScale method returns the scale in distance units per pixel.

Syntax

nScale = CImage:GetImageScale()

Remarks

If the image has a WCS calibration, this returns WCS distance units per pixel. If there is no WCS calibration, measurements it returns 1.0. This method returns an average for both axes. If the image has a different scale in each axis, use the GetImageScaleXy method.

Example

Assume a displayed image has a WCS calibration giving 45.2 microns per pixel. The following script fragment returns the image scale:

I = V:GetImage()

-- load the image from a display window

d = I:GetImageScale()

-- return the scale as a number

Printf("Scale= %lg", d )

-- result: Scale= 45.2.

Related Topics

CImage , GetImageScaleXy