CImage:CoordUnits


The CoordUnits method returns the name of the units used to quote coordinates. If the image has a world coordinate system calibration, this uses WCS units.

Syntax

sUnits = CImage:CoordUnits( Axis )

bullet.gif    Axis is 1 for the x axis, 2 for the y axis.

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 coordinate units for axis 1 (the x, or column-number axis):

I = V:GetImage()

-- load the image from a display window

s = I:CoordUnits(1)

-- return the units string

Printf("Coord units[%d]= '%s'", s )

-- result: Coord units[1]= 'microns'

Related Topics

CImage class, AreaUnits, DistanceUnits


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