CImage:GetImageScaleXy
The GetImageScaleXy method returns the scale in distance units per pixel independently for both image axes.
nScaleX, nScaleY = CImage:GetImageScaleXy()
x and y are in distance units per pixel.
On success, this method returns 2 numbers.
On failure, this method returns the default values 1,1.
If the image has a WCS calibration, this returns WCS distance units per pixel. If there is no WCS calibration, measurements it returns 1,1. If the image has a different scale in each axis, use the GetImageScale method.
Assume a displayed image has a WCS calibration giving 45.2 microns per pixel in the column axis and 42.4 microns per pixel in the row axis. The following script returns the image scales:
|
-- load the image from a display window |
|
-- return the scale as a number |
|
-- result: Scale= 45.2, 42.4. |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.