getSpaceCal
|
integer& Oy, integer& Invert ] )
|
|
Image
|
|
An integer between 1 and 116 specifying the frame number of the image for which the calibration scale is to be retrieved. Values in the range of 100-116 correspond to hidden frames.
|
|
Unit
|
|
A string that returns the name of the current spatial calibration unit.
|
|
Xscale, Yscale
|
|
Floating variables or constants that return the number of spatial calibration units per pixel in the horizontal and vertical direction respectively.
|
|
Ox, Oy
|
|
Optional integers that return the position of the origin of the image coordinate system relative to the top left corner of the image, in pixels. Both positive and negative values are allowed. A negative Ox value indicates that the origin is located to the left of the left edge of the image, while the negative Oy value indicates that the origin is located above the top line of the image.
|
|
Invert
|
|
Optional boolean integer that returns the direction of the vertical axis. Can be one of the following values:
|
|
FALSE=0 indicates a default downward direction for the Y-axis.
|
TRUE=1 indicates an inverted upward direction for the Y-axis.
|
|
ERR_OK
|
|
The flag set if successful.
|
|
ERR_FAILED
|
|
The flag set if failed.
|
This set of statements retrieves parameters of the calibration scale of a sample image and prints them in the terminal window:
|
|
setCurDir ("samples")
|
loadIm (1,"sample8.iwd")
|
getSpaceCal(1,unit,xscale,yscale,ox,oy,invert)
|
print "unit = ",unit
|
print "Xscale=",xscale
|
print "Yscale=",yscale
|
print "XOrigin=",ox
|
print "YOrigin=",oy
|
if invert = TRUE then print("Downward direction for Y-axis")
|
else print ("Upward direction for Y-axis")
|