Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://www.stecf.org/conferences/adass/adassVII/reprints/fitzpatrickm.ps.gz
Äàòà èçìåíåíèÿ: Mon Jun 12 18:51:45 2006
Äàòà èíäåêñèðîâàíèÿ: Tue Oct 2 04:21:46 2012
Êîäèðîâêà:

Ïîèñêîâûå ñëîâà: ð ï ð ï ð ï ð ï ð ï ð ï ð ï
Astronomical Data Analysis Software and Systems VII
ASP Conference Series, Vol. 145, 1998
R. Albrecht, R. N. Hook and H. A. Bushouse, e
Ö Copyright 1998 Astronomical Society of the Pacific. All rights reserved.
ds.
The IRAF Client Display Library (CDL)
Michael Fitzpatrick
IRAF Group 1 , NOAO 2 , PO Box 26732, Tucson, AZ 85726
Abstract. The Client Display Library is a new interface that allows host
(non­IRAF) C or fortran programs to display images or draw into the
graphics overlay using the XImtool image server and image viewers which
emulate the XImtool client protocol such as SAOtng, SAOimage, and
IPAC Skyview. The CDL provides most of the algorithms and function­
ality found in standard IRAF tasks such as DISPLAY and TVMARK, but
provides these in library form for use in host level user programs, much as
the IMFORT library provides access to IRAF images on disk. High­level
procedures allow simple display of IRAF and FITS images, automatic
image scaling, and a wide variety of graphics markers and scalable text.
The IIS protocol used is easily replaced allowing the library to be ported
for use with other display servers.
1. Introduction
For more than a decade IRAF has relied on the use of a display server as the
primary means for image display. IRAF client tasks connect to the server and
send or read data using a modified IIS 3 Model 70 protocol, originally via named
fifo pipes but more recently using Unix domain or inet sockets. The advantage
to this approach was that IRAF client tasks can make use of an image dis­
play without duplicating the code needed for actually displaying the image in
each task. The longtime disadvantage however was that the IIS protocol used
was arcane and undocumented, making the display server largely unavailable
to applications or programmers outside of the IRAF project. Earlier attempts
to solve this problem, such as the SAO­IIS library (Wright and Conrad, 1994),
have shown there was a need in the community for such an interface but never
managed to provide all the features and generality necessary to be widely used.
The CDL is meant to provide an easy­to­use, fully featured application in­
terface which can be easily evolved for future display servers, communications
schemes, or display functionality. It is independent of IRAF itself (as are the dis­
1 Image Reduction and Analysis Facility, distributed by the National Optical Astronomy
Observatories
2 National Optical Astronomy Observatories, operated by the Association of Universities for
Research in Astronomy, Inc. (AURA) under cooperative agreement with the National Science
Foundation
3 International Imaging Systems
200

The IRAF Client Display Library (CDL) 201
play servers) so client tasks can be written for any discipline or application. CDL
client programs can connect to the server using named pipes (fifos), Unix domain
sockets or inet (Internet TCP/IP) sockets. The default connection scheme is the
same as with IRAF (domain sockets then fifos) but client programs can specify
any connection desired. With the C interface it is possible to open multiple
connections to one or more servers, allowing clients to display both locally and
to a remote server which can be anywhere on the Internet.
2. Features
2.1. Image Display
. Connections on (Unix or inet) sockets and fifo pipes
. Hi­level display of IRAF, FITS or arbitrary rasters of any datatype
. Image cursor read/write
. Frame bu#er subraster I/O
. Automatic 8­bit scaling of images
. Automatic frame bu#er selection
. Hardcopy from the client program
2.2. Overlay Graphics
. Marker Primitives
-- Point (10 basic types providing dozens of combinations)
-- Line (arbitrary width, 3 line styles)
-- Box (fill optional)
-- Circle (fill optional)
-- Circular Annuli
-- Polyline
-- Polygon (fill optional)
-- Ellipse (arbitrary size and rotation)
-- Elliptical Annuli (arbitrary size and rotation)
-- Text (arbitrary size and rotation, 4 fonts including Greek, in­line sub
and superscripting capability)
. Erasure of markers
. 14 static colors plus 200 scalable graylevels

202 Fitzpatrick
Figure 1. Example image demonstrating some available marker types
and capabilities. Text in the lower corner was drawn using a filled box
marker to erase the image pixels overlayed with text showing the use
of in­line font changes and sub/superscript capability.
The CDL runs on all Unix platforms and is compatible with the XImtool,
SAOimage, SAOtng and the IPAC Skyview display servers. The distribution
includes all sources, full documentation and example tasks in both C and for­
tran. An experimental SPP interface is available which lets IRAF developers
(or occasional programmers) quickly prototype new applications without wor­
rying about the details of image display. A ``Virtual XImtool'' dummy display
server is also available which can be used as a ``proxy server'', taking input from
one client and re­broadcasting it to a number of other servers, e#ectively creating
a `tee' for display programs.
3. Communications Interface
The CDL currently uses a modified IIS Model 70 protocol to communicate with
IRAF display servers such as XImtool. This protocol is isolated from the rest of
the library by a generic communications interface (providing I/O functions for
the cursor, image rasters, WCS, frame configuration and erasure, etc) which can
be rewritten to use a di#erent protocol without a#ecting the rest of the library.
Servers which provide much more functionality through the client interface can
still be used with only small modifications needed to extend the CDL.

The IRAF Client Display Library (CDL) 203
Figure 2. A demonstration of what can be done with image subraster
I/O. The zoomed feature was created entirely by the client program
which reads back the image pixels after display and writes out a zoomed
subraster to another part of the frame bu#er. Line and box markers
are used to connect the endpoints of each region.
4. Future Work
Image sizes are growing to the point of straining the modern machines used to do
the reductions and have long since past the point where they can be displayed
at full resolution on a typical monitor. The CDL, like most software, could
benefit from some memory optimization to better handle these large images.
New display servers are currently in development meaning the communications
protocol will likely need to be extended if not changed entirely; we expect that
the CDL will be made compatible with the new IRAF message bus architecture
and the next generation display servers.
The graphics markers available provide all the primitives needed to to do
graphics of any complexity however it is up to the client program to still create
the overlay. For simply marking a few positions this is a straightforward task,
but more powerful applications could be developed more easily by providing
high­level routines for axis labeling or improving the speed required to draw
many markers by doing the overlays in memory prior to display. Users with
suggestions or questions are encouraged to contact the author at iraf@noao.edu.
5. Acknowledgments
CDL development was supported in part by the Open IRAF initiative, which is
funded by a NASA ADP grant.
6. References
Wright, J. R. and Conrad, A. R., 1994, in ASP Conf. Ser., Vol. 61, Astronomical
Data Analysis Software and Systems III, ed. Dennis R. Crabtree, R. J. Hanisch
& Jeannette Barnes (San Francisco: ASP), 495