Parameters

Parameters represent data items used in a well-defined way by an algorithm that is computing a result. In the scheme of the iTools, parameters are the raw material fed to visualization objects — the IDL routines that create visual displays.

For example, a visualization object that creates a simple line plot might require two parameters: vectors of dependent and independent data values. These two vectors would be passed to the routines within the visualization object for processing, and the result would be displayed in the iTool window.

When a visualization object is created, it registers one or more parameters with the iTool system. Each parameter has a parameter name and can be of one or more iTool data types. Parameter names are used to route the individual data items to the correct routines within the visualization object. See Creating a Visualization for more on creating visualization objects.

Note
Do not confuse parameters, which define how data is used by a visualization object, with parameter sets, which are containers for data objects. Parameter sets are described in Parameter Sets.

Parameter Names

Each parameter registered by a visualization is given a parameter name. The parameter name is a scalar string, and its scope is the visualization by which it is registered. Different visualizations can register parameters that have different properties using the same parameter name.

Parameter Data Types

Each parameter registered by a visualization is associated with one or more iTool data types by setting the TYPES property. The value of the TYPES property can be a scalar string or a string array; a single parameter can be associated with multiple data types. See iTool Data Types for more on iTool data types.

Registering Parameters

Parameters are registered when a visualization is created; that is, in the Init method of an iTool visualization class. To register a parameter, call the RegisterParameter method of the IDLitParameter class (of which iTool visualization classes are a subclass):

self->RegisterParameter, ParmameterName, $ 
   TYPES = ['DataType1', ..., 'DataTypeN'] 

where ParameterName is a string that defines the name of the parameter and the TYPES keyword is set equal to a string or array of strings specifying the iTool system data types the parameter can represent. (See iTool Data Types for information on iTools data types.)

A typical parameter registration call looks like the following:

self->RegisterParameter, 'Y', /INPUT, TYPES='IDLVECTOR', /OPTARGET 

Here, the string argument Y is the name of the parameter being registered. The INPUT keyword specifies that Y is an input parameter (specified by the method's caller), the TYPES keyword specifies that Y is a vector, and the OPTARGET keyword specifies that operations can be performed on the Y vector.

Additional keywords can be set in the call to RegisterParameter. See the documentation for "IDLitParameter::RegisterParameter" (IDL Reference Guide) for additional details.