Visual Programming: Cantata Basics


A Hands-on Approach to Visual Programming

  1. Executing cantata: from the command line execute cantata, wait until an empty workspace is displayed on your screen.
      % cantata (foreground execution)  
      % cantata& (background execution)
    


    Cantata: empty workspace

    To exit click on the Quit button.

  2. Selecting an operator/glyph: using the mouse press down on Input/Output and from the Data Files option select User defined. Position the selected "operator/glyph" in the workspace.


    User defined operator/glyph

  3. Using the mouse press down on Visualization and from the Non-Interactive Display option select Display Image. Position the selected "operator/glyph" within the workspace.


    Display Image operator/glyph

  4. Connect both operators by "clicking" the mouse on the input and output arrows of each operator. A network of operators is known as a visual program.


    A visual program

  5. Manipulating Connections: once a data flow or control connection has been made between two glyphs, the user can delete, save data to a file (for data flow connections only), or set connection options. Clicking the left mouse button on a connection will bring the options described above. Clicking the middle mouse button will bring the connections options menu directly.


    Manipulating connections: left mouse button (without input file selected)


    Manipulating connections: middle mouse button

  6. Selection of operators/glyphs: operators can be found via menus, by using the Routines and/or Finder submenus selection buttons.


    Menus selection buttons

  7. Explore the options provided by the submenu Routines.


    Routines selection button options

  8. Explore the options provided by the submenu Finder.


    Finder selection button options

  9. Modifying parameters/options of an operator:click on the "pane button" (middle button) of an operator to access its internal parameters.


    Glyph pane button

    Click on the Pane button of the User defined glyph. Once the pane is displayed, at the bottom clear the line and type "$DIP/data/" followed with a carriage return. Click on the Input File button. Now you have access to the directory containing all the images for this course. Select an image by clicking on it. To exit the pane click on the Close button.


    User defined operator pane options

  10. To "browse" the contents of the image files in this directory click on the Input File button. Select an image by clicking on it. Note the browser will go away once a selection has been made. Use the scroll bar to browse through the contents of this directory. To exit click on the Cancel button.


    Input File browser

  11. Executing/Halting a glyph: click on the "off/on" switch found on each executable glyph.

    ---------
    Glyph off-on switch

  12. To kill (destroy) a glyph click on the red "bomb".


    Glyph kill/destroy button

  13. Glyph Error Indicator: the YUCKY FACE will appear under the glyph when the operator has encountered an error during execution.


    Glyph Error Indicator

    Clicking on the YUCKY FACE will display a subform with the error message. For instance,


    Error Pane

  14. Workspace Command Bar and the Workspace Submenu: these two interfaces enable the user to execute the features provided in cantata. The first interface is the Workspace Submenu options.


    Workspace Submenu options

    The second interface to the cantata features is the Workspace Command Bar. This interface appears above the cantata workspace, and it is made of two parts:

    1. a set of command buttons
    2. a single command string selection


    Workspace Command Bar

  15. Workspace Command Bar and the Edit Submenu: these two interfaces enable the user to visually edit a visual program in cantata. The first interface is the Edit submenu options.


    Edit Submenu

    The second interface to the cantata features is the Workspace Command Bar. This interface appears above the cantata workspace as described above.

  16. Saving/Restoring Workspaces: these two interfaces enable the user to save and restore workspaces. The first interface is the Files submenu option. A subform will be displayed with the available options. In the Save Workspace row type in a filename for the workspace you wish to save. If you wish to restore a workspace type in the filename of it in the Restore Workspace row.


    Save/Restore Workspaces

    The second interface utilizes swithes in the Workspace Command Bar.

  17. Workspace Attributes: clicking on the Attributes submenu will a subform to be displayed. This subform allows you to set parameters which control various aspects of cantata.


    Workspace Attributes subform

In summary, cantata is used by the visual programmer to interactively develop visual programs by combining glyphs into a visual program or network.

Advanced programming capabilities in cantata.


DIP Feedback Form

Copyright © 1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved.