The RTD software includes a separate C++ class library for manipulating images. Through the base class ImageData(3) , you can create images of any raw data type and convert them to XImages for display, using any one of a number of color scaling algorithms. Scaling (resizing), rotating and flipping are supported as well as median filtering and cut levels. The details of the different underlying raw image data types is hidden by use of virtual functions and, in some cases, cpp macro templates for subclass methods 1 .
This class library is independent of X or any other libraries (other than the standard system libraries for C and C++), so it could, in principle, be used by client applications, perhaps running on different machines, to preprocess images before sending them to be displayed. The rtdimage display software will accept images in standard FITS style (with origin at lower left) or in already finished XImage style (class XImageData - with origin at upper right and no color scaling needed). In order to use the library, an application needs to have an image, either as a FITS file or as a pointer to image data in memory (or shared memory) and the application needs to know how many colors are available and what their values. This information can be obtained via the RTD remote interface (see rtdRemote(3). The ImageData class is described in the man page ImageData(3) in the Reference section.
1. We used cpp macros rather than C++ templates here because C++ templates are not very portable across compilers yet - at least not the compilation part. Besides, the cpp macros are, in some ways, more flexible. You can choose which methods to define as templates and which to define as special cases.
Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory