Go up one levelGo to Previous Go to Next

Image I/O

Although the current software version only supports FITS image I/O, the classes are organized in such a way as to allow other image types to be supported 1 . The main class here, ImageIO , uses reference counting to manage a pointer to an internal class, which must be a subclass of ImageIORep . The use of reference counting helps to avoid unnecessary copies and simplify memory management. Currently, the only subclass implemented in this library is FitsIO , which is used to read, write, and store FITS images.

Internally, the FitsIO class uses the wcslib to scan FITS headers, and also supports automatic compression and decompression of images using the Compress class described below. For efficiency, mmap is used whenever possible, to avoid long delays reading and writing large FITS files, by mapping the disk files directly to virtual memory. This saves time in image display applications, since the actual image data is only accessed when it is needed. The table below summarizes the classes for ImageIO :

Class

Description

ImageIO

Represents a reference counted image of unknown type.

ImageIORep

Abstract base class for image types.

FitsIO

Class derived from ImageIORep, implements FITS image I/O.


1. The GAIA plugin implements a subclass of ImageIORep for the NDF image format.


Go up one levelGo to Previous Go to Next

Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory