CImage:AreaUnits
The AreaUnits method returns the name of the units used to quote area measurements .If the image has a world coordinate system calibration, this uses WCS units.
sUnits = CImage:AreaUnits() On success, this method returns sUnits as a string. On failure, this method returns nil. |
If the image has a WCS calibration, this returns a WCS unit with squared dimensions. If there is no WCS calibration, measurements are reported in square pixels. This method works even if the image has no WCS calibration.
Assume a displayed image has a WCS calibration in cm per pixel. The following script returns the name of the WCS area measurements units:
|
-- load the image from a display window |
|
-- return the units string |
|
-- result: Area units= 'cm^2' |
CImage class, CoordUnits, DistanceUnits, Image Coordinate System, Subpixel Coordinate Definition
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.