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.

Syntax

sUnits = CImage:AreaUnits()

bullet.gif    On success, this method returns sUnits as a string.

bullet.gif    On failure, this method returns nil.

Remarks

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.

Example

Assume a displayed image has a WCS calibration in cm per pixel. The following script returns the name of the WCS area measurements units:

 

I = V:GetImage()

-- load the image from a display window

s = I:AreaUnits()

-- return the units string

Printf("Area units= '%s'", s )

-- result: Area units= 'cm^2'

Related Topics

CImage class, CoordUnits, DistanceUnits, Image Coordinate System, Subpixel Coordinate Definition


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.