Reviewed by
(Posted June 13, 1997 ? Issue 10; archived July 11, 1997)
Editor's Note: This month's new Software Solutions column in HMS Beagle explores researchers' novel applications of Interactive Data Language.
Interactive Data Language from Research Systems, Inc., allows users to develop customized data analysis and interactive data visualization applications to suit specific research needs. IDL is a high-level, integrated programming environment providing users with built-in routines for data handling, mathematics, statistics, graphics, and image processing. Tasks that require pages of C or Fortran code may be accomplished with only a few IDL functions. These programs are compatible across all platforms that support IDL, and are easily compiled from within IDL. IDL functions also can be used interactively from the command line. Since IDL is a programming environment, proficiency takes some time, but a new graphical application makes it easier for novices to use the language's many features. Unfortunately a backward-compatibility problem exists, requiring some earlier versions of IDL programs to be modified for use in version 5.0. This annoyance aside, IDL is an ideal environment for creating customized data analysis and visualization applications for your specific computing requirements.
When IDL is first launched, the main IDL window is displayed. This interface consists of toolbars, menu choices, an editor window, an output log, the command line, and a status bar. When the mouse pointer is moved over a menu item or a toolbar button, the status bar displays brief messages about them. The command input line is the IDL prompt where users can interactively enter specific commands. All of the text output or the results of these commands are displayed in the output log window. Finally, the editor windows are displayed in the multiple document panel at the top of the main IDL window. Users can open multiple editor windows to work on several IDL programs simultaneously, and the size of the multiple document panel can be adjusted by changing the size of the output log window.
RSI includes an impressive IDL 5.0 demonstration program that shows examples of applications in earth sciences, engineering, medical research, and space/physics. In addition, features on data visualization and analysis and IDL programming makes it easy to see the kinds of solutions IDL can achieve. Animated demos such as the orbiting satellite and beating heart are fun to play with, but the real-life utility of IDL is obvious when running the math and statistics, signal processing, and image processing examples. Many of these demo programs are provided as program files that can be opened, examined, and modified in IDL.
Programming Language
In addition to using IDL interactively from the command line, users can create customized programs or applications using IDL as a programming language. IDL includes a handy built-in text editor to facilitate programming. Lines with semicolons are treated as comments, and names of functions, statements, or comments used in a program are automatically color-coded by the text editor (e.g., quoted text enclosed by apostrophes is red, IDL functions are dark blue, program flow statements are dark red, scalars are light brown, and comments are green).
IDL supports necessary statements and operators for efficient programming. Many useful statement types such as if-then, for, while, and repeat (among others) are supported in addition to a variety of relational, mathematical, and Boolean operators. IDL's real value is not appreciated until one examines the many built-in routines for animation, image processing, general graphics, input/output, statistical testing, curve fitting, differential equations, mapping, and time-series analysis, among many others.
IDL offers other advantages. The flexible input and output routines makes it easy to read and write many data formats, including common image types. Widgets can be used to create graphical user interfaces to IDL programs, and IDL code runs identically across all supported platforms. Programs created in IDL can be distributed to other IDL users, or to nonusers with a special runtime license. Finally, existing Fortran and C code can be linked dynamically into IDL, or can make calls to IDL routines as a subroutine library.
The easiest way to demonstrate IDL's utility as a programming language is to discuss examples of applications developed with it. The Visible Human CD is a fully digitized cadaver constructed with thousands of CT and MRI images. The body was sliced at 0.33-mm intervals, reconstructed, and navigated with an application developed in IDL. Users can browse axial, sagittal, and coronal views of the body using a point-and-click graphical interface. In addition, numerous astronomy research labs utilize IDL to visualize data collected from space, including many of the images gathered through the Hubble Space Telescope project. Read the Software Solutions column in this issue of HMS Beagle for more examples of IDL in action.
Handling Data
Flexible routines for data input/output (I/O) as well as data generation are well implemented in IDL. Formatted and unformatted I/O tasks are handled with a number of routines. IDL supports scientific data formats ideal for complex data sets such as HDF (hierarchical data format), CDF (common data format), and NetCDF (network CDF). Collections of built-in routines provide an easy interface for each of these data types. In addition, routines to read and write common graphics file formats such as GIF, BMP, JPG, PICT, and TIFF files are included with IDL. The photograph used in the graphics example below was opened in IDL using the READ_GIF function.
IDL supports different data types including integers, floating-point, string, complex, and double precision, among others. Each of these data types can be manipulated by operators, functions, and programs written in IDL. To determine what data type a particular variable holds, simply type "help, varName" in the command line and IDL will return the attributes for that variable. Variables simply contain information about the data, including type and structure. Variables can take the form of a scalar, an array, or structures that are composed of a combination of scalars, arrays, or other structures.
IDL data analysis functions are extensive. These include routines for curve and surface fitting, differential equations, integration, eigenvalue, eigenvector, and data transformations. In addition, functions for statistical analysis are included as well as statistical fitting, hypothesis testing, correlation analysis, multivariate analysis and time-series analysis. Many of the mathematical routines included with IDL are based on the Numerical Recipes mathematics library and take the form of a single function command with keywords to modify the operation of the function.
IDL includes many routines for displaying and manipulating images. Simple x-y plots, bar and box charts, contour, mesh surface, and perspective plots enable users to visualize and analyze data effectively. Users can include multiple plots on a single page and can specify precisely where each plot will appear. Plots with user-defined symbols can be created with the included USERSYM routine. XLOG, YLOG, and ZLOG keywords can be used with PLOT to create any combination of linear and log axes. In addition, users can create complex plots by combining plot types. For example, SHOW3 is a routine that displays an image, a surface mesh plot as well as a contour plot.
IDL provides routines for image display, array and image processing, and
graphics and color table manipulation. Image display functions allow
users to create scrolling graphics windows, "dissolve" an image for
effect, and zoom in on portions of the displayed image. Digital
filters, erosion, dilation, inversion, image warping, rotation, and
resampling functions are a few of the built-in image processing
functions. There are many more routines than can be discussed in a
short review for handling tasks such as image annotation and color
balance. As an example, this reviewer opened a graphic image file in IDL
and did a few manipulations with some of these functions. The original
image (panel 1) was smoothed (panel 2), equalized (panel 3) and rotated
(panel 4) using a few commands in IDL.
Code Portability
Programs written in IDL are compatible across all platforms that support IDL. The code can be distributed as plain text files and compiled and run on any platform running IDL, allowing users to develop and share code. RSI warns users to pay special attention to the development requirements for platform-independent code, but in this reviewer's experience, code written in Unix versions of IDL ran with no problems in IDL 4.01 for Windows.
A greater problem with backward compatibility seems to exist between IDL versions 5.0 and 4.01 for Windows. Most simple programs written in IDL 4.01 worked fine in version 5.0, but many of the applications available on the Internet did not. Although this compatibility problem is unfortunate, it may be the side effect of updating IDL to take advantage of object-oriented programming techniques and better 3-D graphics capabilities, which will ultimately improve IDL's functionality.
Internet Resources and Technical Support
IDL users will never lack technical resources. Numerous IDL Web sites exist, as do extensive public-domain libraries of IDL code. This large base of IDL users provides an excellent safety net for problems not solved with the help of RSI's capable technical help. A great Web site to start with is run by the former director of IDL training at RSI, David Fanning. His Web site provides users with tips for, and problems encountered in, the latest version of IDL. In addition to training services provided by Fanning, RSI offers many opportunities for training courses. A useful IDL FAQ is maintained by several long-time users of IDL, and can be accessed from the RSI Web page. Finally, a Usenet newsgroup devoted to IDL programming issues can be found at comp.lang.idl-pvwave.
Documentation
The documentation for IDL is extensive and effectively written. The online guide appears to contain the same text as the printed manuals. Each manual is provided as an online document, so index/search routines must be implemented as you select specific manuals. The manuals included with IDL are Using IDL, Building IDL Applications, IDL Reference Guide (two volumes), Objects and Object Graphics, Advanced Development Guide, Scientific Data Formats, Using IDL Insight, IDL DataMiner Guide, and IDL HaniGuide.
Is There a Down Side?
IDL is not intended for the casual user. Although it is relatively convenient to build easy-to-use applications using IDL as a programming environment, the development of these applications is simply not for everyone. This reviewer found the syntax and routines available in IDL intuitive, and relatively easy to implement, but only simple programs were written during this review. It takes some time to become a proficient IDL user. The problem with backward compatibility is significant. It is dismaying to see that some of the more elaborate programs available on the Internet are not compatible. It was not possible to determine if categorical fixes would take care of this compatibility problem, which renders useless a valuable resource for novice IDL users.
IDL is a programming environment that requires a significant investment of time for user proficiency. IDL is not recommended for the casual user with intermittent needs for its flexibility and extensibility. It is highly recommended for those with complex data visualization and analysis needs requiring customized applications. When evaluating a command line environment such as IDL, the basic criteria that this reviewer set are: (1) is it easy to input and output data, (2) are the plotting routines effective, (3) can I analyze my data in the way that I need, and (4) is there a good user base to help with programming questions? IDL is a resounding success in each area. RSI has developed a well-conceived, intelligently implemented programming environment for researchers who require application development to meet their specific data visualization and analysis needs.
IDL 5.0 requires Windows 3.1x, Windows 95, or Windows NT (3.5 or
higher), with a minimum of 8 Mb RAM required (16 Mb recommended) for
Windows 3.1x and Windows 95, and 16 Mb required (32 Mb recommended) for
Windows NT. Between 8 and 50 Mb of hard drive space is needed depending
on the installation options selected, as well as a CD-ROM drive for
installation. In addition, IDL 5.0 is available on many other operating
systems including Macintosh, PowerMac, Unix, Linux, and OpenVMS.
IDL 5.0 is available from Research Systems, Inc. Pricing for Windows,
Macintosh, and Linux versions starts at $1,500, while Unix and OpenVMS
versions start at $3,495. RSI can be contacted by e-mail at info@rsinc.com, and by phone at (303)
786-9900. See the RSI Web
site to download the IDL demo.
Dylan Bulseco
is Research Associate at the Worcester Foundation for Biomedical Research
and contributing editor of the HMS Beagle Software
department.

