Retrieve binary data from one or more XPA servers.
XPAGetB( XPA_Type xpaHdl, String_Type dest, String_Type cmd )
XPAGetB( XPA_Type xpaHdl, String_Type dest, String_Type cmd,
String_Type max_rec )
XPAGetB( XPA_Type xpaHdl, String_Type dest, String_Type cmd,
String_Type max_rec, String_Type mode )
Return values: (Array_Type results, Array_Type names, Array_Type
messages)
The XPAGetB() function is used to retrieve binary data
from one or more XPA servers. It is the same as the XPAGet() function except that the results are returned as an arry of BString_Type variables reather than String_Type.
chips> system ("ds9 &")
chips> xpaset ("ds9", "file new stars.fits")
1
chips> ( res, , ) = XPAGetB (XPAOpen(), "ds9", "array")
chips> image = bstring_to_array (res[0])
Here we start up ds9, tell it to open a file - called stars.fits, and then get the image data useing XPAGetB(). The bstring_to_array() function from the S-Lang Run-Time Library is used to convert the returned value (res[0]) into an array of unsigned characters (image). This array could be manipulated - e.g. image[ where (image > 20) ] = 20; and then sent back to ds9 for display using xpaset().
This function is new to CIAO 3.2.
|