
Whenever you create or load an image into the Huygens software, a Tcl command is created with the name of the new image. This so-called object oriented approach means that you always specify the image object first and subsequently the operation you want to perform on it.
*
Images in Huygens are Tcl commands
This allows a very natural syntax. For instance, to add `1' to all pixel values in an image `foo' and place the result in an image `bar' you enter:
foo + 1 -> bar
We have opted for the -> symbol instead of the `=' symbol because the operations in Huygens nearly always have the character of an assignment operation, and are not equations.
In the notation below we specify the generic image command by the keyword `source' or `parent' in regular Courier, whichever is the most appropriate for the operation. In most commands there is also a destination or target for which we use the keyword `destination' or `target'. Because these are true variables, slanted Courier is used. For example, the addition command shown above would be specified as:
source + float -> destination
?-type byte|int|float|complex?
To create a 10x10x10 image named `foo' of basic data type `byte' you enter:
img create foo -dim {10 10 10} -type byte
If you need a quick summary of the syntax of a specific command you enter:
myimage operation ?
with `myimage' the image to which you want to apply the operation. A summary of the syntax will be printed in the task report window.