New Features in IDL 6.0
New iTools for Interactive Analysis
Introducing the iTools
New iTool Routines
New iTool Object Classes
ITools User's and Developer's Guides
New IDL Virtual Machine
Getting the IDL Virtual Machine
Using the IDL Virtual Machine
New IDL-Java Bridge
New Path Caching
Visualization Enhancements
Object Graphics Font Rendering Improvements
New Depth Buffer Controls for Graphic Objects
Analysis Enhancements
New FITA and STATUS Keywords to CURVEFIT
New MEASURE_ERRORS Keyword to GAUSSFIT
New PIXEL_CENTER Keyword for ROI Masks
Enhancements to the INTERVAL_VOLUME, ISOSURFACE, and MESH_DECIMATE Routines
Language Enhancements
Increment and Decrement Operators
Compound Assignment Operators
New Logical Operators
New Logical Operation Functions
LOGICAL_PREDICATE Compilation Option
Multiple Subscripts With Associated File Variables
Enhancement to the ARRAY_EQUAL Routine
Enhancement to the HELP Routine
Enhancement to the MESSAGE Routine
Enhancement to the RESOLVE_ALL Routine
Enhancement to the SHMMAP Routine
Enhancement to the STRSPLIT Routine
New ARRAY_INDICES Function
New IDL_VALIDNAME Function
File Access Enhancements
NetCDF Library Update
Enhancement to the FILE_LINES Routine
New FILE_BASENAME and FILE_DIRNAME Functions
IDLDE Enhancements
Path Cache Preference
New Visualization Menu for iTools
User Interface Toolkit Enhancements
Enhancements to the DIALOG_PICKFILE Routine
Button Widget Enhancements
New WIDGET_PROPERTYSHEET Function
Enhancements to the WIDGET_CONTROL and WIDGET_INFO Routines
Enhancement to WIDGET_DROPLIST
Documentation Enhancements
New iTools User's Guide
New iTools Developer's Guide
New and Enhanced IDL Objects
New IDL Object Classes
New IDL Object Properties
IDL Object Property Enhancements
IDL Object Method Enhancements
New and Enhanced IDL Routines
New IDL Routines
IDL Routine Enhancements
Routines Obsoleted in IDL 6.0
Requirements for this Release
IDL 6.0 Requirements
ION 2.0 Requirements
Using IDL
Introducing IDL
Overview
Launching IDL
Launching the iTools
Startup Options
Troubleshooting
Environment Variables Used by IDL
Setting Environment Variables
Environment Variables - All Platforms
Environment Variables - UNIX and MacOS X
Command Line Options for IDL Startup
Startup Files
Message of the Day Files
Using Your Mouse with IDL
Using a Two-Button Mouse
Using a Macintosh (One-Button) Mouse
Quitting IDL
Helpful Resources
The IDL Help System
Reporting Problems
The IDL Development Environment
Components of the IDLDE
Menu Bar
Toolbars
Project Window
Multiple Document Panel
Output Log
Variable Watch Window
Command Input Line
Status Bar
Docking/Undocking
Control Panel Buttons
File Menu
Edit Menu
Search Menu
Run Menu
Project Menu
Macros Menu
Window Menu
Help Menu
Keyboard Shortcuts
Using the IDL Editor
About the IDL Editor
Keyboard Shortcuts
Searching
Text Selection Modes (Windows Only)
Chromacoded Editor (Windows Only)
Block Comments
Functions/Procedures Menu
Using External Editors (Motif)
Using the IDL Command Input Line
Input to IDL
Command Recall and Line Editing
Copying and Pasting Multiple IDL Code Lines
Changing the Number of Lines Saved
Executive Commands
Issuing Operating System Commands
Setting IDL Preferences
Customizing IDL
Platform Differences
General Preferences
Layout Preferences
Graphics Preferences
Editor Preferences
Microsoft Windows Editor Configuration
Startup Preferences
Font Preferences
Microsoft Windows
UNIX
Path Preferences
Working With Macros
What are Macros?
Using the IDL Macro Toolbar
Creating UNIX Macros
Using the Edit Macros Dialog
Manually Editing the Resource File
Creating Windows Macros
Command Stream Substitutions
Building IDL Example Macros
Creating a Macro to Call a Text Editor in IDL for UNIX
Change Working Directory Macro
Printing in IDL
Overview
Printing Graphics
Printing IDL Direct Graphics
Printing IDL Object Graphics
IDL Printer Setup in Windows
IDL Printer Setup in UNIX or Mac OS X
The Xprinter Setup Dialog
Configuring Printer Setup Options
Adding a New Printer to the List of Printer Choices
Customizing IDL on Motif Systems
Using X Resources to Customize IDL
X Resources in Brief
Resource Files
Format of IDL Resources
X Resources Used by IDL
Reserving Colors
Command Line Options
Modifying the Control Panel
Adding Macros Toolbar Buttons
Adding Macros Menu Entries
Examples
Action Routines
CDE File Manager Support
Preparing and Running Programs in IDL
Overview
Introduction to IDL Program Files
IDL Program Files
IDL .sav Files
Running IDL Program Files
Running Program Files
Restoring and Running .sav Files
Interrupting Program Execution
Variable Context After Interruption
Aborting IDL
Saving Variables from an IDL Session
For More Information on Programming
Executing Batch Jobs in IDL
Overview
Interpretation of Batch Statements
A Batch Example
Journaling in IDL
Overview
Journaling Examples
Using IDL iTools
Introducing the IDL iTools
Introducing the iTools
Using this Guide
Importing and Exporting Data
About the iTools Data Manager
Data Manager Utilities
About the Parameter Editor
Data Import Methods
Using Insert Visualization
Using the Data Import Wizard
Using File Open
Using the Data Manager Dialog
Importing From a File
Importing Image Data
Importing ASCII Data
Importing Binary Data
Importing a Variable
Exporting Data
Exporting Data to a File
Exporting Data to the IDL Session
Unknown Data
Gridding Wizard
iTool Common Tasks
Introduction
Selection of Objects
Select All
Undo/Redo
Common Manipulation Tasks
Translating
Scaling
Zooming
Rotating
Transforming
Filtering
Morphing
Legends
Annotations
Text Annotations
Line Annotations
Rectangle Annotations
Oval Annotations
Polygon Annotations
Freehand Annotations
Additional Axes
Rendering Translucent Objects
Property Sheets
Visualization Property Sheets
Operations Property Sheets
The Visualization Browser
The Preferences Browser
General Settings
Visualizations
Operations
File Readers
File Writers
The Operations Browser
Window Layouts
File Operations
Opening Files
Importing Variables and Files
Saving Files
Exporting Variables and Files
Printing
Exiting the iTool
Additional Operations
Plotting a Histogram
Displaying Statistics
Resetting Dataspace Ranges
Recording a Message Log
Working with Images
Introduction
Colors in the iImage Tool
Displaying Images
Displaying Multiple Images
Image Properties
Modifying Properties
Adding a Colorbar
Adding Axes
Modifying Image Brightness
Resampling an Image
Filtering an Image
Morphing an Image
Contouring an Image
Surfacing an Image
Manipulating the Image Display
Rotating an Image
Scaling an Image and Byte Scaling an Image
Inverting an Image
Flipping an Image
View Zoom
Cnvas Zoom
Image ROIs
Region Growing
Adding Annotations
Line Profiles
Panning
Selecting the Data Range
iImage Tool Operations
Viewing a Histogram
Viewing Image Statistics
Resetting Dataspace Ranges
Dataspace Pixel Scaling
Working with Surfaces
Introduction
Displaying Surfaces
Surface Properties
The Visualization Browser
The Operations Browser
Adding a Colorbar
Adding a Light
Adding a Legend
Adding Axes
Imaging a Suface
Contouring a Surface
Resampling a Surface
Filtering a Surface
Adding a Texture Map
Manipulating Surface Displays
Rotating a Surface
Scaling a Surface
Adding Annotations
View Zoom
Canvas Zoom
iSurface Tool Operations
Viewing a Histogram Plot
Viewing Statistics
Working with Contours
Introduction
Displaying Contours
Displaying Regular-grid Data
Displaying Irregular-grid Data
Contour Properties
Labelling Contours
Changing the Contour Colors
Filling Contours
Adding a Colorbar
Adding a Legend
Adding Axes
Filtering a Contour
Manipulating the Contour Display
Translating
View Zoom
Canvas Zoom
Scaling a Contour Display
Adding Annotations
iContour Tool Operations
Viewing a Histogram
Viewing Statistics
Working with Plots
Introduction
Displaying Two-Dimensional Plots
Displaying Three-Dimensional Plots
Displaying Polar Plots
Overplotting
Plot Properties
Modifying Properties
Adding Legends
Adding a Colorbar
Adding Error Bars
Curve Fitting
Filtering a Plot
Manipulating the Plot Display
Translating
Adding Annotations
View Zoom
Canvas Zoom
Selecting the Data Range
iPlot Tool Operations
Scaling a Plot Display
Viewing a Histogram
Viewing Statistics
Working with Volumes
Introduction
Displaying Volumes
Multi-Channel Volumes
Rendering Volumes
Volume Properties
Modifying Properties
Adding a Colorbar
Adding Axes
Resampling Volumes
Showing an Image Plane
Viewing the Image Plane in iImage
Extracting an IsoSurface
Extracting an Interval Volume
Manipulating the Volume Display
Rotating a Volume
Scaling a Volume
View Zoom
Canvas Zoom
Morphing a Volume
Adding Annotations
iVolume Tool Operations
Viewing a Histogram
Viewing Statistics
Smoothing a Volume
iTools Interface Reference
Introduction
Menu Bar Items
Toolbar Items
File Menu
Edit Menu
Insert Menu
Operations Menu
Window Menu
Help Menu
File Toolbar
Edit Toolbar
Manipulator Toolbar
Annotation Toolbar
Context Menu
Property Controls
Operations Properties
The Operations Browser
Statistics Properties
Histogram Properties
Filter Properties
Smooth Properties
Median Properties
Convolution Properties
Roberts Filter Properties
Sobel Filter Properties
Curve Fitting Properties
Morphing Properties
Rotate Properties
Rotate Left Properties
Rotate Right Properties
Rotate By Angle Properties
Transform Properties
Resample Properties
Rotate Data Properties
Scale Data Properties
Invert Image Properties
Byte Scale Properties
Dataspace Operation Properties
Reset Ranges Properties
Pixel Scale Properties
Region Grow Properties
Surface Properties
Contour Properties
Image Properties
Volume Properties
Image Plane
Isosurface
Render Volume
Interval Volume
Image Plane Properties
Launch iImage
Visualization Properties
Introduction
The Visualization Browser
Window Properties
View Properties
Visualization Layer Properties
Data Space Properties
Visualization Type Properties
Image
Plot
Plot 3D
Surface
Contour
Volume
Isosurface
Interval Volume
Image Plane
Colorbar
Histogram
Axes
Lights
Polygonal ROI
IDL Graphics Objects
2D Annotation Layer Properties
Text Annotation Properties
Line Annotation Properties
Line Profile Annotation Properties
Rectangle Annotation Properties
Oval Annotation Properties
Polygon Annotation Properties
Freehand Annotation Properties
Legend Properties
Legend Contour Items
Legend Contour Level Items
Legend Plot Items
Legend Surface Items
Programming in IDL
Overview
What is an IDL Application?
Can I Distribute My Application?
About Building Applications in IDL
Components of the IDL Language
Expressions and Operators
Overview
IDL Operators
Parentheses
Square Brackets
Mathematical Operators
Minimum and Maximum Operators
Matrix Multiplication
Array Concatenation
Logical Operators
Bitwise Operators
Relational Operators
Conditional Expression
Operator Precedence
Data Type and Structure of Expressions
Expression Type
Expression Structure
Constants and Variables
Data Types
Basic Data Types
Complex Data Types
Determining the Data Type of a Variable or Array
Constants
Integer Constants
Floating-Point and Double-Precision Constants
Complex Constants
String Constants
Representing Non-Printable Characters
Type Conversion Functions
Variables
Attributes of Variables
Variable Names
System Variables
Common Blocks
Common Block Definition Statements
Common Block Reference Statements
Procedures and Functions
Overview
Defining a Procedure
Calling a Procedure
Example
Defining a Function
Example
Automatic Execution
Forward Function Definition
Parameters
Correspondence of Formal and Actual Parameters
Copying Parameters
Number of Parameters
Example
Using Keyword Parameters
Keyword Inheritance
Keyword Inheritance Mechanisms
Choosing a Keyword Inheritance Mechanism
Example: Writing a Wrapper Routine
Example: By Value Versus By Reference
Entering Procedure Definitions
Note Regarding Functions
How IDL Resolves Routines
Parameter Passing Mechanism
Calling Mechanism
Recursion
Example
Setting Compilation Options
Advice for Library Authors
Strings
Overview
A Note About the Examples
String Operations
Concatenation
Formatting Data
Case Folding
White Space Removal
Length
Substrings
Splitting and Joining Strings
Comparing Strings
Non-string and Non-scalar Arguments
String Concatenation
Using STRING to Format Data
Reading Data from Strings
Byte Arguments and Strings
Case Folding
Whitespace
Removing All Whitespace
Removing Leading or Trailing Blanks
Removing All Types of Whitespace
Finding the Length of a String
Substrings
Searching for a Substring
Searching For the Last Occurrence of a Substring
Inserting the Contents of One String into Another
Extracting Substrings
Splitting and Joining Strings
Comparing Strings
Case-Insensitive Comparisons of the First N Characters
String Comparisons Using Wildcards
Complex Comparisons Using Regular Expressions
Learning About Regular Expressions
Meta Characters
Subexpressions
Bracket Expressions
Arrays
Overview
Array Subscripts
Array Subscripting
Extra Dimensions
Subscripting Scalars
Array Subscript Syntax: [ ] vs. ( )
Subscript Ranges
Dimensionality of Subarrays
Examples
Using Arrays as Subscripts
Example
Combining Subscripts
Subscript Ranges
Other Subscript Arrays
Scalars
Storing Elements with Array Subscripts
Examples
Columns, Rows, and Array Majority
Structures
Overview
Named Structures
Anonymous Structures
Creating and Defining Structures
Structure Inheritance
Example of Creating a Structure
Structure References
Subscripted Structure References
Examples of Structure References
Using HELP with Structures
Parameter Passing with Structures
Storing Into Array Fields
Arrays of Structures
Creating an Array of Structures
Examples of Arrays of Structures
Structure Input/Output
Formatted Input/Output with Structures
Unformatted Input/Output with Structures
Strings
String Length Issues
Advanced Structure Usage
Number of Structure Tags
Names of Structure Tags
Example
Automatic Structure Definition
Relaxed Structure Assignment
Using Relaxed Structure Assignment
Pointers
Overview
Heap Variables
Creating Heap Variables
Saving and Restoring Heap Variables
Pointer Heap Variables
IDL Pointers
Null Pointers
The PTR_NEW Function
The PTRARR Function
Operations on Pointers
Assignment
Dereference
Equality and Inequality
Dangling References
Heap Variable Leakage
Pointer Validity
Freeing Pointers
Pointer Examples
Creating a Linked List
Example Files-Using Pointers to Create Binary Trees
Basics of IDL Programming
Introduction to IDL Programming
What is an IDL Program?
Main-Level Programs
Include Files
Program Files
Creating a Simple Program
Compiling and Running Your Program
Compilation Errors
Commenting Your IDL Code
Saving Compiled IDL Programs
Creating a .sav File of a Simple Routine
Customizing and Saving an ASCII Template
Saving and Restoring the XROI Utility and Image ROI Data
Restoring Compiled IDL Programs and Data
Restoring .sav Files from the Command Line
Using RESTORE to Explicitly Restore a .sav File
Note on IDL 5.4 SAVE Files
Files and Input/Output
Overview
File I/O in IDL
Simple Examples
Routines for Input/Output
Unformatted Input/Output
Advantages of Unformatted I/O
Disadvantages of Unformatted I/O
Formatted Input/Output
Advantages of Formatted I/O
Disadvantages of Formatted I/O
Free Format I/O
Explicit Format I/O
Opening Files
Platform-Specific Keywords to the OPEN Procedure
Closing Files
Logical Unit Numbers (LUNs)
The Standard Input, Output, and Error LUNs
File Units (1-99)
File Units (100 -128)
Reading and Writing Very Large Files
Limitations of Large File Support
Using Free Format Input/Output
Free Format Input
Free Format Output
Example: Free Format Input/Output
Using Explicitly Formatted Input/Output
Rules for Explicitly Formatted Input/Output
Format Reversion
Format Codes
A Format Code
: Format Code
$ Format Code
F, D, E, and G Format Codes
I, O, and Z Format Codes
Q Format Code
Quoted String and H Format Codes
T Format Code
TL Format Code
TR and X Format Codes
C() Format Code
C printf-Style Quoted String Format Code
Example: Reading Tables of Formatted Data
Example: Reading Records that Contain Multiple Array Elements
Using Unformatted Input/Output
Unformatted Input/Output of String Variables
Example: Reading C-Generated Unformatted Data with IDL
Example: Reading IDL-Generated Unformatted Data with C
Example: Reading a Sun Rasterfile from IDL
Portable Unformatted Input/Output
XDR Considerations
IDL XDR Conventions for Programmers
Example: Reading C-Generated XDR Data with IDL
Associated Input/Output
Example of Using Associated Input/Output
Reading Data from Associated Files
Writing Data to Associated Files
Multiple Subscripts With Associated File Variables
Files with Multiple Structures
Offset Parameter
Efficiency
Unformatted Data from UNIX FORTRAN Programs
File Manipulation Operations
IDL File Handling Routines
Locating Files
Changing File Access Permissions
Copying Files and Directories
Renaming Files and Directories
Deleting Files and Empty Directories
Expanding Files and Directory Paths
Creating Directories
Testing for a File's Existence
Searching for a Specific File
Working with UNIX Links
Getting Help and Information
Getting Information About a File
The FSTAT Function
Flushing File Units
Positioning File Pointers
Testing for End-Of-File
GET_KBRD
Using the STRING Function to Format Data
Reading Data from a String Variable
UNIX-Specific Information
Reading FORTRAN-Generated Unformatted Data with IDL
Windows-Specific Information
Scientific Data Formats
Support for Standard Image File Formats
Assignment
Overview of the Assignment Statement
Assigning a Value to a Variable
Examples
Assigning Scalars to Array Elements
Using Array Subscripts
Assigning Arrays to Array Elements
Examples
Using Array Subscripts
Avoid Using Range Subscripts
Examples
Compound Assignment Operators
Using Associated File Variables
Program Control
Overview
Compound Statements
BEGIN...END
Conditional Statements
IF...THEN...ELSE
CASE
SWITCH
CASE Versus SWITCH
Loop Statements
FOR...DO
REPEAT...UNTIL
WHILE...DO
Jump Statements
Statement Labels
BREAK
CONTINUE
GOTO
Definition of True and False
Writing Efficient IDL Programs
Overview
Expression Evaluation Order
Avoid IF Statements
Example-Summing Elements
Example-Using Array Operators and WHERE
Use Vector and Array Operations
Use System Functions and Procedures
Example
Use Constants of the Correct Type
Eliminate Invariant Expressions
Virtual Memory
Access Large Arrays by Memory Order
Running Out of Virtual Memory
Minimizing Virtual Memory
The TEMPORARY Function
Virtual Memory System Parameters
IDL Implementation
The IDL Code Profiler
The Profile Dialog
The Profile Report Dialog
Using the IDL Code Profiler
Multithreading in IDL
The IDL Thread Pool
Benefits of the IDL Thread Pool
Possible Drawbacks to the Use of the IDL Thread Pool
Controlling the IDL Thread Pool
Viewing the Current Thread Pool Settings
Using the Default Thread Pool Settings
Changing Global Thread Pool Settings
Changing Thread Pool Settings for a Specific Computation
Disabling the Thread Pool
Routines that Use the Thread Pool
Solutions to Common IDL Tasks
Determining Variable Scope
Determining if a Keyword is Set
Determining the Number of Array Elements in an Expression or Variable
Determining if a Variable is Defined
Supplying Values for Missing Keywords
Supplying Values for Missing Arguments
Determining the Size/Type of an Array
Examples
Determining if a Variable Contains a Scalar or Array Value
Calling Functions/Procedures Indirectly
Example
Executing Dynamically-Created IDL Code
Building Cross-Platform Applications
Overview
Which Operating System is Running?
File and Path Specifications
Choosing Files at Runtime
Selecting Files Programmatically
Environment Variables
Files and I/O
Byte Order Issues
Logical Unit Numbers
Naming of IDL .pro Files
Math Exceptions
Operating System Access
Display Characteristics and Palettes
Finding Screen Size
Number of Colors Available
Fonts
Printing
SAVE and RESTORE
Widgets
Dialog Routines
Base Widgets
Positioning Widgets within a Base Widget
Fonts used in Widget Applications
Motif Resources
WIDGET_STUB
Widget Event Inconsistencies
Using External Code
IDL DataMiner Issues
Debugging an IDL Program
Overview
Debugging Commands
A Simple Example
Step Through the Program
Fix the Program
Breakpoints
Working with Breakpoints
The Variable Watch Window
Customizing Variable Watch Window Layout
The Variable Watch Interface Description
Using the Variable Watch Window
Controlling Errors
Overview
Default Error-Handling Mechanism
Disappearing Variables
Controlling Errors Using CATCH
Interaction of CATCH, ON_ERROR, and ON_IOERROR
Canceling an Error Handler
Generating an Exception
Example Using CATCH
Controlling Errors Using ON_ERROR
Controlling Input/Output Errors
Error Signaling
Message Blocks
Obtaining Traceback Information
Error Handling
Math Errors
Accumulated Math Error Status
Special Floating-Point Values
The FINITE Function
Integer Conversions
Providing Online Help For Your Application
Overview
Providing Help Within the User Interface
Tooltips
Status Lines
Text Widgets
Displaying Text Files
Using an External Viewer
About IDL's Online Help System
The Full IDL Documentation Set in PDF
Microsoft Windows Help
UNIX Online Help
IDL's Acrobat Plug-In
Using IDL's Online Help Viewers
Microsoft Windows Help
Portable Document Format Files
HTML Files
Paths for Help Files
Creating Applications in IDL
Creating IDL Projects
Overview
Access to all Files in Your Application
Working with an IDL Project
Compiling and Running Your Application
Build Your Application
Exporting Your Applications
The IDL Project Interface
Example of a Project
Where to Store the Files for a Project
Creating a Project
Opening, Closing, and Saving Projects
Opening a Project
Saving a Project
Closing a Project
Modifying Project Groups
Modifying Project Groups
Adding, Moving, and Removing Files
Adding Files
Moving Files
Removing Files
Working with Files in a Project
Editing a Source File
Compiling a File
Testing a File
Setting the Properties of a File
Modifying Properties of Multiple Files
Setting the Options for a Project
Selecting the Build Order
Compiling an Application from a Project
To Compile All Files in Your Project
To Compile Only Modified Files in Your Project
Building a Project
About IDL GUIBuilder Files
Running an Application from a Project
Exporting a Project
Exporting Your Project's Source Files
Exporting Your Project to a Save File
Exporting a Runtime Distribution
Distributing IDL Applications
What is a Stand-Alone IDL Application?
Types of IDL Applications
Limitations of IDL Applications
Building a Native IDL Application
Example Native IDL Application
Licensing Options for IDL Applications
Free Runtime License (IDL Virtual Machine)
Purchased Licenses
The IDL Virtual Machine
Limitations of Applications that Run in the IDL Virtual Machine
Building an Application that Runs in the IDL Virtual Machine
Version Compatibility of .sav Files
Running a .sav File in the IDL Virtual Machine
Example
Embedded Licensing
Including License Information in your Application
Running a .sav File with an Embedded License
Example
Runtime Licensing
Building a Runtime Application
Obtaining and Installing a Runtime License
Running a .sav File with a Runtime License
Example
Building Your Application
Preparing a Distribution
Windows
UNIX
Installing your Application
Incorporating the IDL Data Miner
Using IDL Objects
Object Basics
Object-Oriented Programming
IDL Object Overview
Classes and Instances
Encapsulation
Methods
Polymorphism
Inheritance
Persistence
Class Structures
Automatic Class Structure Definition
Inheritance
Object Heap Variables
Dangling References
Heap Variable "Leakage"
Freeing Heap Variables
Null Objects
The Object Lifecycle
Creation and Initialization
Destruction
Operations on Objects
Assignment
Method Invocation
Equality and Inequality
Obtaining Information about Objects
Method Routines
Defining Method Routines
The Implicit Self Argument
Calling Method Routines
Searching for Method Routines
Method Overriding
Object Examples
Using the XML Parser Object Class
About XML
About XML Parsers
Using the XML Parser
Subclassing the IDLffXMLSAX Object Class
Using Your Parser
Validation
Example: Reading Data Into an Array
Creating the xml_to_array Object Class
Using the xml_to_array Parser
Example: Reading Data Into Structures
Creating the xml_to_struct Object Class
Using the xml_to_struct Parser
Building Complex Data Structures
Creating Graphical User Interfaces in IDL
Using the IDL GUIBuilder
Overview
Starting the IDL GUIBuilder
Opening Existing Interface Definitions
Creating an Example Application
Defining Menus for the Top-level Base
Creating a Draw Widget
Running the Application in Test Mode
Generating the IDL Code
Handling the Open File Event
Handling the Exit Event
Handling the Load Color Table Event
Handling the Smooth Event
Compiling and Running the Example Application
IDL GUIBuilder Tools
Using the IDL GUIBuilder Toolbar
Using the Properties Dialog
Using the Widget Browser
Using the Menu Editor
Using the Bitmap Editor
Using the Tree Editor
Widget Operations
Selecting Widgets
Moving and Resizing Widgets
Cutting, Copying, and Pasting Widgets
Deleting Widgets
Undoing and Redoing Operations
Generating Files
Generating Resource Files
Generating IDL Code
IDL GUIBuilder Examples
Understanding IDL GUIBuilder Event Handling Code
Writing Event Callback Routines
Handling Initialization Arguments
Integrating Multiple Interfaces
Adding Compound Widgets
Controlling Widget Display
Widget Properties
Common Widget Properties
Common Attributes
Common Events
Base Widget Properties
Base Widget Attributes
Base Widget Events
Button Widget Properties
Creating Multiple Radio Buttons or Checkboxes
Button, Radio Button, and Checkbox Widget Attributes
Button, Radio Button, and Checkbox Widget Events
Text Widget Properties
Text Widget Attributes
Text Widget Events
Label Widget Properties
Label Widget Attributes
Label Widget Events
Slider Widget Properties
Horizontal and Vertical Slider Widget Attributes
Horizontal and Vertical Slider Widget Events
Droplist Widget Properties
Droplist Widget Attributes
Droplist Widget Events
Listbox Widget Properties
Listbox Widget Attributes
Listbox Widget Events
Draw Widget Properties
Draw Area Widget Attributes
Draw Area Widget Events
Table Widget Properties
Table Widget Attributes
Table Widget Events
Tab Widget Properties
Tab Widget Attributes
Tab Widget Events
Tree Widget Properties
Tree Widget Attributes
Tree Widget Events
Widgets
Overview
Widget Types
Widget Programming
Widget Values
Instantiating Widgets
Widget Primitives
ActiveX
Base
Button
ComboBox
Draw
Droplist
Label
List
PropertySheet
Slider
Tab
Table
Text
Tree
Compound Widgets
Widget Values of Compound Widgets
Compound Widgets Provided with IDL
Compound Widget Categories
CW_ANIMATE
CW_ARCBALL
CW_BGROUP
CW_CLR_INDEX
CW_COLORSEL
CW_DEFROI
CW_FIELD
CW_FILESEL
CW_FORM
CW_FSLIDER
CW_LIGHT_EDITOR
CW_ORIENT
CW_PALETTE_EDITOR
CW_PDMENU
CW_RGBSLIDER
CW_ZOOM
Dialogs
DIALOG_MESSAGE
DIALOG_PICKFILE
DIALOG_PRINTERSETUP
DIALOG_PRINTJOB
DIALOG_READ_IMAGE
DIALOG_WRITE_IMAGE
Utilities
XBM_EDIT
XDISPLAYFILE
XDXF
XFONT
XINTERANIMATE
XLOADCT
XMTOOL
XOBJVIEW
XPALETTE
XPCOLOR
XPLOT3D
XROI
XSURFACE
XVAREDIT
XVOLUME
Creating Widget Applications
About Widget Applications
Running the Example Code
Other Examples of Widget Programming
Widget Programming Concepts
Widget IDs
Widget Parent/Child Relationships
Instantiating and Displaying Widgets
Example 1: A Simple Widget Application
Widget Application Lifecycle
Construct the Widget Hierarchy
Provide an Event-Handling Routine
Realize the Widgets
Register the Program with the XMANAGER
Interact with the Application
Destroy the Widgets
Manipulating Widgets
WIDGET_CONTROL
WIDGET_EVENT
WIDGET_INFO
XMANAGER
XREGISTERED
Working With Widget IDs
Use the Widget Event Structure
Pass the Widget ID Using a Widget User Value
Use a User Name to Locate the Widget
Pass the Widget ID Explicitly
Use a COMMON Block
Widget User Values
Widget Event Processing
What are Widget Events?
Structure of Widget Events
Managing Widget Events with XMANAGER
Event Processing and Callbacks
Example 2: Event Processing and User Values
Managing Application State
Techniques for Preserving Application State
Compound Widgets
Writing Compound Widgets
The HANDLER Field of the Widget Event Structure
Example 3: Compound Widget
Using CW_DICE in a Widget Program
Debugging Widget Applications
Widget Application Techniques
Working with Widget Events
Interrupting the Event Loop
Identifying Widget Type from an Event
Keyboard Focus Events
Timer Events
Tracking Events
Context Menu Events
Using Multiple Widget Hierarchies
Widget Group Behaviors
Floating bases
Modal bases
Menubars
Creating Menus
Button Groups
Lists
Pulldown Menus
Menus on Top-Level Bases
Context-Sensitive Menus
Widget Sizing
Widget Geometry Terms and Concepts
How Widget Geometry is Determined
Dynamic Resizing
Explicitly Specifying the Size and Location of Widgets
Preventing Layout Flicker
Tips on Creating Widget Applications
Using Button Widgets
Bitmap Button Labels
Tooltips
Exclusive and Non-Exclusive Buttons
Using Draw Widgets
Using Direct Graphics in Draw Widgets
Using Object Graphics in Draw Widgets
Scrolling Draw Widgets
Context Events in Draw Widgets
Draw Widget Example
Button, Motion, and Keyboard Events
Using Property Sheet Widgets
Registering Properties
Selecting Properties
Changing Properties
User-defined Properties
Property Sheet Example
Multiple Properties Example
Using Table Widgets
Default Table Size
Selection Modes
Data Types
Retrieving Data
Edit Mode
Example: Single Data Type Data
Example: Structure Data
Using Tab Widgets
Example: A Simple Tab Widget
Tab Sizing and Multiline Behavior
Example: Retrieving Values
Using Tree Widgets
Types of Tree Widgets
Example: A Simple Tree
Setting the Tree Selection State
Making a Tree Entry Visible
Replacing the Default Bitmaps
iTools
What are iTools?
What is the iTools Component Framework?
Advantages of Using the Framework
About this Manual
What this Manual is Not
About the iTools Code Base
Documented vs. Undocumented Classes
Skills Required to Use the iTools Component Framework
Understanding the iTools Component Framework
iTool System Architecture
Overview
iTool Object Identifiers
Proxy Identifiers
Object Descriptors
iTool Object Hierarchy
iTool System Object
Registering Components
Registration Methods
iTool Messaging System
Sending Notifications
Notification Messages
Observers
System Resources
Icon Bitmaps
Help System
Data Management
Overview
iTool Data Manager
Adding Data to the Data Manager
Removing Data from the Data Manager
iTool Data Types
Composite Data Types
Data Types of iTool Components
iTool Data Objects
Data Objects
Data Containers
Parameter Sets
Predefined iTool Data Classes
Parameters
Parameter Names
Parameter Data Types
Registering Parameters
Data Type Matching
Data Update Mechanism
Property Management
About the Properties Interface
What is a Property?
Properties vs. Preferences
How are Properties Displayed?
Setting and Retrieving Property Values
Property Data Types
Property Registration
Property Identifiers
Property Attributes
Property Aggregation
Property Data Types
User Defined Property Types
Registering Properties
Registering a Property
Pre-Registered Properties
Property Identifiers
Property Attributes
Available Property Attributes
Property Aggregation
Working with Aggregated Properties
Property Update Mechanism
Properties of the iTools System
Using the iTools Component Framework
Creating an iTool
Overview
The iTool Creation Process
Creating a New iTool Class
Creating an Init Method
Creating the Class Structure Definition
Registering a New Tool Class
Using ITREGISTER
Example
Creating an iTool Launch Routine
Specifying Command-Line Arguments and Keywords
Creating Data Objects
Handling Errors
Creating an iTool Instance
Example: Simple iTool
Class Definition File
Launch Routine
Creating a Visualization
Overview
The Visualization Type Creation Process
Predefined iTool Visualization Classes
Creating a New Visualization Type
Creating an Init Method
Creating a Cleanup Method
Creating a GetProperty Method
Creating a SetProperty Method
Creating an OnDataChangeUpdate Method
Creating an OnDataDisconnect Method
Creating the Class Structure Definition
Registering a Visualization Type
Using IDLitTool::RegisterVisualization
Specifying Useful Properties
Unregistering a Visualization Type
Example: Image-Contour Visualization
Class Definition File
Creating an Operation
Overview
The Operation Creation Process
Predefined iTool Operations
Operations and the Undo/Redo System
Data-Centric Operations
Generalized Operations
Creating a New Data-Centric Operation
How an IDLitDataOperation Works
Creating an IDLitDataOperation
Creating an Init Method
Creating a Cleanup Method
Creating an Execute Method
Creating a DoExecuteUI Method
Creating a GetProperty Method
Creating a SetProperty Method
Creating an UndoExecute Method
Creating the Class Structure Definition
Creating a New Generalized Operation
How an IDLitOperation Works
Creating an IDLitOperation
Creating an Init Method
Creating a Cleanup Method
Creating a DoAction Method
Creating a RecordInitialValues Method
Creating a RecordFinalValues Method
Creating a GetProperty Method
Creating a SetProperty Method
Creating an UndoOperation Method
Creating a RedoOperation Method
Creating the Class Structure Definition
Registering an Operation
Using IDLitTool::RegisterOperation
Specifying Useful Properties
Unregistering an Operation
Example: Data Resample Operation
Class Definition File
Creating a File Reader
Overview
The File Reader Creation Process
Predefined iTool File Readers
Creating a New File Reader
Creating an Init Method
Creating a Cleanup Method
Creating a GetProperty Method
Creating a SetProperty Method
Creating an IsA Method
Creating a GetData Method
Creating the Class Structure Definition
Registering a File Reader
Using IDLitTool::RegisterFileReader
Unregistering a File Reader
Example: TIFF File Reader
Class Definition File
Creating a File Writer
Overview
The File Writer Creation Process
Predefined iTool File Writers
Creating a New File Writer
Creating an Init Method
Creating a Cleanup Method
Creating a GetProperty Method
Creating a SetProperty Method
Creating a SetData Method
Creating the Class Structure Definition
Registering a File Writer
Using IDLitTool::RegisterFileWriter
Unregistering a File Writer
Example: TIFF File Writer
Class Definition File
Modifying the iTool User Interface
iTool User Interface Architecture
Overview
User Interface Objects
Using iTool User Interface Elements
Overview
Status Messages
Prompts
Informational Messages
Creating a User Interface Service
Overview
Creating and Using a UI Service
Predefined iTool UI Services
Creating a New UI Service
Creating the UI Service Routine
Creating Supporting User Interface Elements
Registering a UI Service
Using ITREGISTER
Example
Using the RegisterUIService Method
Executing a User Interface Service
Example: Changing a Property Value
Creating the SrvExample service
Creating the SrvExample interface
Creating an operation that calls the service
Registering the SrvExample service
Registering the opName operation
Invoking the opName operation
Creating a User Interface Panel
Overview
Creating and Using a UI Panel
Creating a UI Panel Interface
Panel Creation Routines
About the Panel Widget
Registering the Panel with the User Interface Object
Adding Observers
Create the Widget Hierarchy
Create Event Handlers
Creating Callback Routines
Callback Routine Signature
Registration of Callback Routines
Retrieving Widget State Information
Registering a UI Panel
Registering the Panel in the iTool Launch Routine
About the TYPE property
Changing the Panel Location
Example: A Simple UI Panel
Panel Creation Routine
Panel Event Handler Routine
Panel Callback Routine
Panel Type Specification
IDL Language Reference
IDL Syntax
Elements of Syntax
Procedures
Functions
Arguments
Keywords
Alphabetical List of IDL Routines
Symbol
.COMPILE
.CONTINUE
.EDIT
.FULL_RESET_SESSION
.GO
.OUT
.RESET_SESSION
.RETURN
.RNEW
.RUN
.SKIP
.STEP
.STEPOVER
.TRACE
A
A_CORRELATE
ABS
ACOS
ADAPT_HIST_EQUAL
ALOG
ALOG10
AMOEBA
ANNOTATE
ARG_PRESENT
ARRAY_EQUAL
ARRAY_INDICES
ARROW
ASCII_TEMPLATE
ASIN
ASSOC
ATAN
AXIS
B
BAR_PLOT
BEGIN...END
BESELI
BESELJ
BESELK
BESELY
BETA
BILINEAR
BIN_DATE
BINARY_TEMPLATE
BINDGEN
BINOMIAL
BLAS_AXPY
BLK_CON
BOX_CURSOR
BREAK
BREAKPOINT
BROYDEN
BYTARR
BYTE
BYTEORDER
BYTSCL
C
C_CORRELATE
CALDAT
CALENDAR
CALL_EXTERNAL
CALL_FUNCTION
CALL_METHOD
CALL_PROCEDURE
CASE
CATCH
CD
CEIL
CHEBYSHEV
CHECK_MATH
CHISQR_CVF
CHISQR_PDF
CHOLDC
CHOLSOL
CINDGEN
CIR_3PNT
CLOSE
CLUST_WTS
CLUSTER
COLOR_CONVERT
COLOR_QUAN
COLORMAP_APPLICABLE
COMFIT
COMMON
COMPILE_OPT
COMPLEX
COMPLEXARR
COMPLEXROUND
COMPUTE_MESH_NORMALS
COND
CONGRID
CONJ
CONSTRAINED_MIN
CONTINUE
CONTOUR
CONVERT_COORD
CONVOL
COORD2TO3
COPY_LUN
CORRELATE
COS
COSH
CPU
CRAMER
CREATE_STRUCT
CREATE_VIEW
CROSSP
CRVLENGTH
CT_LUMINANCE
CTI_TEST
CURSOR
CURVEFIT
CV_COORD
CVTTOBM
CW_ANIMATE
CW_ANIMATE_GETP
CW_ANIMATE_LOAD
CW_ANIMATE_RUN
CW_ARCBALL
CW_BGROUP
CW_CLR_INDEX
CW_COLORSEL
CW_DEFROI
CW_FIELD
CW_FILESEL
CW_FORM
CW_FSLIDER
CW_LIGHT_EDITOR
CW_LIGHT_EDITOR_GET
CW_LIGHT_EDITOR_SET
CW_ORIENT
CW_PALETTE_EDITOR
CW_PALETTE_EDITOR_GET
CW_PALETTE_EDITOR_SET
CW_PDMENU
CW_RGBSLIDER
CW_TMPL
CW_ZOOM
D
DBLARR
DCINDGEN
DCOMPLEX
DCOMPLEXARR
DEFINE_KEY
DEFINE_MSGBLK
DEFINE_MSGBLK_FROM_FILE
DEFROI
DEFSYSV
DELVAR
DERIV
DERIVSIG
DETERM
DEVICE
DFPMIN
DIAG_MATRIX
DIALOG_MESSAGE
DIALOG_PICKFILE
DIALOG_PRINTERSETUP
DIALOG_PRINTJOB
DIALOG_READ_IMAGE
DIALOG_WRITE_IMAGE