A SERVICE OF

logo

Chapter 6: Creating a Visualization 123
iTool Developer’s Guide Creating a New Visualization Type
with significant extra functionality will likely define additional structure fields, and
may inherit from other iTool classes, the basic principles are the same.
Creating an Init Method
The visualization class Init method handles any initialization required by the
visualization object, and should do the following:
define the Init function method, using the keyword inheritance mechanism to
handle “extra” keywords
call the Init methods of any superclasses, using the keyword inheritance
mechanism to pass “extra” keywords
register any data parameters used when creating visualizations of the new type
register any properties of your visualization type, and set property attributes as
necessary
create all the graphics objects needed by the visualization, and add them to the
visualization object
define a custom selection visual, if desired
perform other initialization steps as necessary
return the value 1 if the initialization steps are successful, or 0 otherwise
Note
While the Init method registers data parameters for a visualization, it does not
accept data parameters itself. Data parameters are set in the OnDataChangeUpdate
method.
Definition of the Init Function
Begin by defining the argument and keyword list for your Init method. The argument
and keyword list defines positional parameters (arguments) accepted by your method,
defines any keywords that will be handled directly by your method, and specifies
whether keywords not explicitly handled by your method will be passed through to
other routines called by your method via IDL’s keyword inheritance mechanism. The
Init method for a visualization type generally looks something like this:
FUNCTION
MyVisualization
::Init,
MYKEYWORD1
= mykeyword1, $
MYKEYWORD2
= mykeyword2, ..., _REF_EXTRA = _extra