CImage:DistanceUnits


The DistanceUnits method returns the name of the units used to quote distance measurements. If the image has a world coordinate system ("WCS") calibration, this uses WCS units.

Syntax

sUnits = CImage:DistanceUnits()

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 units. If there is no WCS calibration, measurements are reported in pixels. This method works even if the image has no WCS calibration.

Example

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

I = V:GetImage()

-- load the image from an Image window

s = I:DistanceUnits()

-- return the units string

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

-- result: Distance units= 'microns'

Related Topics

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


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