iTool Data Types

Every iTool data item (IDLitData object or IDLitDataContainer object) has an associated iTool data type. The iTool data type of a data item is specified via the TYPE property of the data object, which can contain any scalar string.

Note
Do not confuse iTool data types with IDL's inherent data types — integers and floating-point integers of various sizes and precisions, strings, structures, pointers, and object references. iTool data types are used only by the iTool system when matching data objects with the parameters expected by a visualization or operation. IDL data types describe how a value or values are stored in computer memory. iTool data types need not correspond directly to an IDL data type.

iTool data typing allows the iTool system to match up data objects with visualization parameters even if the data objects have not been explicitly associated with the visualization parameters. Similarly, an iTool operation may apply only to specific forms of data; the iTool data typing mechanism allows an operation to "see" only data of the appropriate type.

Composite Data Types

Because IDLitData objects can be collected in IDLitDataContainer objects (and, by extension, IDLitParameterSet objects), it is possible that data objects with different iTool data types will be collected in a single container. The iTool data typing system allows these heterogeneous data sets to be named with unique iTool data types that reflect the contents of the container. For example, you might define a data container that contains IDLitData objects with the iTool data types of IDLVECTOR and IDLARRAY2D with your own iTool data type, such as MY_PLOT.

Data Types of iTool Components

Since the iTool data type of a data item can be any scalar string value, it is up to the iTool developer to ensure that a data object assigned a given iTool data type contains the data expected by visualizations and operations that accept that type.

Visualizations or operations that accept an iTool data type are written to act on data items that have specific IDL data types (or collections of specific IDL data types, in the case of compound data types). If the data object contains data in a format not expected by the visualization or operation, errors or unexpected behaviors may result.

Table 3-1 lists the iTool data types defined by the standard iTools included with IDL. You should avoid using these iTool data type names when defining data objects that do not match the contents listed here; if data objects with different contents are given these iTool data type names, portions of the standard iTool functionality may no longer function correctly.

Table 3-1: iTool data types used by the standard iTools shipped with IDL.

iTool Data Type
Contents

IDLARRAY2D

A two-dimensional array of any IDL data type

IDLARRAY3D

A three-dimensional array of any IDL data type

IDLCONNECTIVITY

A vector containing connectivity list data

IDLIMAGE

A composite data type that includes IDLIMAGEPIXELS and IDLPALETTE data

IDLIMAGEPIXELS

One or more two-dimensional image planes

IDLOPACITY_TABLE

A 256-element byte array

IDLPALETTE

A 3 x 256-element byte array

IDLPOLYVERTEX

A composite data type that contains a vector of vertex data and a vector of connectivity data

IDLVECTOR

A vector of any IDL data type

IDLVERTEX

A vector containing vertex data

In addition to avoiding use of the standard iTool data type names for new data types, you should consider using unique naming schemes for iTool data types you create. Choosing your own iTool data type naming scheme will help to avoid conflicts with iTools built by others. This is especially important if you intend to share your iTool code with other IDL users. Choosing a unique prefix or suffix for your iTool data type names should guard against most namespace collisions.