Tcl notation
Documentation on the different Tcl Huygens extensions to the Tcl Tk libraries follow the notation as defined in Tcl and the Tk Toolkit by John Ousterhout (ISBN 0-201-63337-Z Addison-Wesley, New York).
Tcl commands and text which must be entered verbatim are in
Courier
. Formal arguments to the commands are in slanted Courier
. Optional arguments are enclosed in question marks. For example the (simplified) syntax for creating an image is:img create name
The word
img
is a command added by the Huygens Compute Engine (CE) to the Tcl language, the word create
is an option which must be entered verbatim to create an image. The word name
can be substituted for the desired name of the new image.Actually, the
img
create command is much more complex. For instance, it allows you to specify the dimensions of the image in the form of an index vector. Index vectors are sets of up to five integers enclosed in curly braces, for example {10 10 10}
. Each number enclosed by the curly braces corresponds with image dimensions X, Y, Z, t, Channel, in that order. Regular vectors are sets of up to four floating point numbers between curly braces, for example {1.5 22 1.4 0}
. As before, the numbers correspond with the dimensions X, Y, Z, t.The syntax for specifying the dimensions of a new image is:
?-dim indexVector?
The question marks mean that the specification of the dimensions is optional, i.e. you may also omit the string to use the default parameters. To create a 10x10x10 image named 'foo' you enter:
img create foo -dim {10 10 10}
Optional arguments take default values when not specified. A default value is shown between brackets after the optional parameter:
?-dim indexVector ({32 32 32 0 1})?
The results of a Tcl command are in slanted Courier:
set foo 50
=> 50