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.
sUnits = CImage:DistanceUnits()
where
sUnits is a string describing the distance units.
On success, this method returns sUnits.
On failure, this method returns nil.
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.
Assume a displayed image has a WCS calibration in microns per pixel. The following script returns the name of the WCS distance units:
|
-- load the image from an Image window |
|
-- return the units string |
|
-- result: Distance units= 'microns' |