About This Guide

The ImageVision Library (IL) is an object-oriented, extensible toolkit designed for developers of image-processing applications. Typical image processing programs access existing image data, manipulate it, display it, and save the processed results. IL provides a robust framework within which developers can easily create such programs to run on all Silicon Graphics® workstations.

IL consists of a library written in the C++ programming language; interfaces for the C language are also available. The object-oriented nature of C++ provides a simplified programming model based on abstractions of what images are and how they are manipulated. This model relieves developers of many tedious programming details and allows them to conceptually design creative programming solutions. Also, because IL is written in C++, developers can easily extend it, for example, to incorporate their own image processing algorithms or to include support for their own image file formats. Several examples of images produced using IL appear in Chapter 4, “Operating on an Image.”

What This Guide Contains

This guide presents a task-oriented perspective of IL. The topics in this guide are arranged to coincide with the order in which you need to refer to them while writing an image processing program. To illustrate the use of IL, code examples are sprinkled liberally throughout the guide. Additional sample source code is provided online; see “Online Source Code”. Brief descriptions of the chapters in this guide follow:

  • Chapter 1, “Writing an ImageVision Library Program,” shows what a typical image processing application that uses IL looks like. It presents an IL program that performs the tasks common to many image processing applications. It also summarizes the differences among the C++, C, and Fortran interfaces to IL.

  • Chapter 2, “The ImageVision Library Foundation,” explains the general architecture and design philosophy of IL. Most of this chapter is devoted to discussion of the principal image class (ilImage), from which virtually all IL classes derive, and the class that implements a key part of IL's execution model (ilCacheImg).

  • Chapter 3, “Accessing External Image Data,” describes how to read and write image data from and to either a file on disk or memory.

  • Chapter 4, “Operating on an Image,” discusses the more than 70 image processing algorithms provided with IL. It explains how to use them and what effect they have on image data.

  • Chapter 5, “Displaying an Image,” describes how to display and manage a set of images on the screen in an interactive program. You can allow a user of your program to move images, perform wipes, roam around an image, and create split views of multiple images.

  • Chapter 6, “Extending ImageVision Library,” explains how to extend the capabilities of IL to implement your own derived classes. You might extend IL to include support for your own file format or to incorporate your own image processing algorithm.

  • Chapter 7, “Optimizing Your Application,” provides information on optimizing your IL programs by reducing memory usage, taking advantage of hardware acceleration, and making use of IL's multi-threading facility.

  • Chapter 8, “The Programming Environment,” provides information on the programming environment available on Silicon Graphics workstations. It mentions special tools that may help you in writing, compiling, and debugging your IL program.

In addition to these chapters, this guide includes several appendices as handy summaries of useful information:

Other documentation on IL is contained in the ImageVision Library Reference Pages. These reference pages provide concise yet thorough descriptions of each C++ class included in IL. They are only available online in versions for C++, C, and Fortran programmers. See “Reading the Reference Pages” for more information on the exact content of the reference pages.

Suggestions for Further Reading

Because IL is written in C++, it is easiest to describe its design philosophy and how to program with it by talking about the C++ classes that compose IL. While it is not necessary that you know how to program in C++, you can gain more from this guide if you understand the concepts of object-oriented programming. Where possible, however, this guide avoids focusing on topics directly related to the C++ implementation of IL. In addition, a brief introduction to C++ is included in Appendix C. Programming examples in Chapter 1, “Writing an ImageVision Library Program,” are given in C++, C, and Fortran. Some books on C++ you might find helpful include:

  • Ellis, Margaret, and Bjarne Stroustrup. The Annotated C++ Reference Manual. AT&T Bell Laboratories, 1990. The official C++ language reference manual.

  • The C++ Programmer's Guide. A short manual that provides information about implementing C++ programs on Silicon Graphics workstations.

  • Lippman, Stanley. C++ Primer. AT&T Bell Laboratories, 1991. An introductory-level, tutorial-style presentation of C++.

This guide assumes that you are familiar with the principles of image processing. A good, general discussion of image processing can be found in any of several textbooks, such as:

  • Jain, Anil K. Fundamentals of Digital Image Processing. Prentice-Hall, Inc., 1989. A thorough presentation of the major concepts of image processing, written for graduate students.

  • Pratt, William K. Digital Image Processing. John Wiley & Sons, 1991.

  • Gonzalez, Rafael C., and Richard E. Woods. Digital Image Processing. Addison-Wesley, 1992.

To learn more about the RealityEngine™ architecture, read:

  • Akeley, Kurt, and Tom Jermoluk. RealityEngine Graphics™. In Proceedings of SIGGRAPH `93 (August 1993), pp. 109-116.

Most sample programs in this guide include calls to the IRIS Graphics Library (GL), and IL itself uses the GL to perform rendering in the frame buffer. These calls are not explained in much detail since the GL is documented separately in these Silicon Graphics books:

  • Graphics Library Programming Guide

  • Graphics Library Reference Pages

  • Graphics Library Programming Tools and Techniques

IL provides support for manipulating files stored in the format defined by Tag Image File Format (TIFF), Revision 6.0, distributed by Aldus Corp. You might want to obtain the official specification of this format directly from Aldus (411 First Avenue South; Suite 200; Seattle, WA 98104; (206) 628-6593).

  • TIFF 6.0 Specification

IL provides support for multi-threading on single- and multi-processor machines. If you want to know more about writing multi-threaded applications, refer to this document:

  • Parallel Programming on Silicon Graphics Computer Systems

IL uses dynamic linking. To learn more about using dynamic linking with your applications, read:

  • the dlopen, dlsym, and dlerror reference pages

  • IRIX™ Programming Guide

Adding a User Interface to Your ImageVision Library Program

IL does not impose any particular user interface (UI), so you can use any UI toolkit—such as IRIS IM, Silicon Graphic's port of the industry-standard OSF Motif™—to allow the user to control your program. To support such interactive control, IL provides many functions for altering parameters dynamically. IL also keeps track of when parameters have changed so that image data can be updated automatically. These user-interface manuals are available from Silicon Graphics:

  • OSF/Motif Programmer's Guide

  • OSF/Motif Programmer's Reference

  • OSF/Motif Style Guide

  • IRIS IM Programming Notes

Silicon Graphics recommends that you write mixed-model programs rather than pure GL programs. A mixed-model program is essentially an X program that uses the GL to handle graphics; the GL is completely removed from all areas governed by the X server. If you are creating a mixed-model X Window System and IL program, you might also want to refer to these volumes in the O'Reilly X Window System Series, published by O'Reilly & Associates, Inc., Sebastopol, California:

  • Volume One: XLIB Programming Manual, by Adrian Nye

  • Volume Four: X Toolkit Intrinsics Programming Manual, by Adrian Nye and Tim O'Reilly

Volumes One and Four are available from Silicon Graphics as part of the IRIS® Development Option (IDO).

Style Conventions

These style conventions are used in this guide:

  • Bold—Functions, data members, and data types

  • Italics—Variables, filenames, spatial dimensions, and command

  • Regular—Class names and enumerated types

Code examples are set off from the text in a fixed-space font.