CImage:GetAxisLabel


The GetAxisLabel method returns the label for measurements along a specified image axis.

Syntax

sLabel = CImage:GetAxisLabel( nAxis )

where

    nAxis is 1 for the x axis, 2 for the y axis, etc.

    sLabel is the axis label, a string.

    On success, this method returns sLabel.

    On failure, this method returns nil.

  

If the image is in FITS format, this returns the value of the CUNITn keyword for image axis n. You can place an axis label into the header of a FITS format image by adding a string with the CUNITn keyword. The present method reads that string.

Example

Assume a displayed image has no WCS calibration. The following script returns the name of the axis label for axis 1 (the x, or column-number axis):

I = V:GetImage()

-- load the image from a display window

axis = 1

-- column axis

s = I:AxisLabel(axis)

-- return the label string

Printf("Label[%d]= '%s'",axis,s)

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

Related Topics

AreaUnits

CImage class