3.1.7 Console Window


The Console window is the user interface to Amira's advanced controlling features. It serves two purposes. First, it gives you some feedback on what is currently going on. Such feedback messages include warnings, error indications and notes on problems as well as information on results. Second, it provides a command line interface, i.e., a shell where Amira commands can be entered.

  Figure 32: Amira's console window displays info messages and lets you enter Tcl-commands.

Amira's console commands are based on Tcl (Tool Command Language). This means you can write command scripts using Tcl with Amira specific extensions. For a complete description of Tcl and its control structures we refer to the text book Tcl and the Tk Toolkit by John K. Ousterhout, the creator of Tcl. Like many other books about Tcl this also covers the Tk GUI toolkit. Note that Tk is not used in Amira.

Concerning Amira extensions there are some fixed command names like load or viewer and temporary ones which are associated to modules and data objects. The general format of the temporary commands is:

     object command-word target-value

In particular, when creating an OrthoSlice module, a command with the same name is introduced, e.g. OrthoSlice or OrthoSlice2 or OrthoSlice3 ... depending on how many instances of OrthoSlice modules already exist, and removing the module from the Object Pool also removes the command. As long as the module exists, all its associated command words are available. By these commands you may set the more specialized functional options that the module provides. The command interface of a particular module is described in the User's Reference Guide. A help function that displays all functions provided by a module is also available. You activate it by entering the module command with the help option.

Because of the object-oriented concepts underlying Amira's design you should think of a module or data object as an instance of an Amira class - e.g. there is a class HxOrthoSlice of which OrthoSlice and OrthoSlice2 are instances - and of commands as associated to classes. Due to Amira's class hierarchy all commands associated to a particular class are also associated to all of its sub-classes, i.e., a module command is also available for all other modules that are instances of a sub-class of that module's class, and the same applies to data classes. Moreover, there is a class HxObject with sub-classes HxModule and HxData from which all modules respectively data classes are derived. Therefore the commands provided by HxObject, listed below as Object commands, are available for all modules and all data objects.

To execute a single console command just type in its name and arguments and press `Enter'. If you select an object and then press the [TAB] key on the empty command line in the console window then the name of the object will be automatically inserted. Often, this saves a lot of typing. The Console supports a command history mechanism. Use `up arrow' and `down arrow' to scroll up and down in the history list. To execute a file containing many Tcl commands use `load filename' or load the script file via Amira's file dialog from the file menu. For advanced script examples take a look at Amira's demo files.

Commands:

help
Shows the
help window.

load command-file
Loads and executes the command file. The same command is used to load ordinary data objects into Amira.

quit
Quit the application.

Object allPorts
Lists all ports of Object.

Object clipGeom PlaneModule
Causes all geometry display of the object to be clipped by the plane defined by PlaneModule. For example, a plane module is any module derived from Arbitrary Cut. The geometry of an object might be clipped by up to six clipping planes. Also see unclipGeom below.

Object deselect
Deselects an object, i.e., the object's widgets vanish from the Working Area.

Object destroy
The object is removed, as well as certain dependent objects.

Object fire
Calls the internal update and compute methods of the object.

Object getIconPosition
Returns the position of the object's icon in the Object Pool display area.

Object getTypeId
Returns the type of the object.

Object help
Displays all commands specific to that object.

Object hideIcon
Hides the icon of a specific object.

Object select
Selects an object, i.e., the object's widgets appear on the Working Area.

Object setIconPosition xPos yPos
Sets the position of the object's icon in the Object Pool display area to xPos yPos.

Object setLabel newlabel
Changes the name of the object to newlabel. If already some other object with the same name exists, newlabel will be automatically modified.

Object setViewerMask mask
This command is used to show a possible 3D output of the object in certain viewer windows and to hide it in other viewers. The bits in mask controls the viewers, e.g. a mask value of 2 shows the output in viewer 1 and hides it in viewer 0.

Object showIcon
Shows a specific object as an icon in the Object Pool display area.

Object unclipGeom PlaneModule
Undos the effect of the clipGeom command described above.

Object update
Calls the internal update method of the object.


Back ( Viewer Commands)  Next (3.1.8 File Dialog)  Home